Patent ID: 6615302
Filing Date: 2003-09-02
Classification: H04L

Abstract:
A CAN microcontroller that supports a plurality of message objects, comprising:a processor core that runs CAN applications; a plurality of message buffers associated with respective ones of the message objects; a CAN/CAL module that processes incoming messages that include a plurality of frames, each frame having a maximum number n of data bytes; a plurality of message object registers associated with each of the message objects, including: at least one buffer size register that contains a message buffer size value that specifies the size of the message buffer associated with that message object; and, at least one buffer location register that contains an address pointer that points to an address of the storage location in the message buffer associated with that message object where the next data byte of the current incoming message is to be stored; wherein the CAN/CAL module includes: a message handling function that transfers successive flames of the current incoming message to the message buffer associated with a selected one of the message objects designated as a receive message object for the current incoming message; an address pointer increment function that, in response to a transfer of the current data byte to the message buffer associated with the designated receive message object, increments the address pointer to the address of the storage location in that message buffer where the next data byte of the current incoming message is to be stored; a flame status detection function that detects whether or not the current flame of the current incoming message is the final flame of the current incoming message; and, a buffer-status detection function that: each time that the address pointer is incremented, retrieves the incremented address pointer value, retrieves the message buffer size value from the at least one buffer size register associated with the designated receive message object, and decodes the retrieved message buffer size value into a buffer-size mask comprised of a plurality x of bits, where x is equal to a prescribed number of allowable buffer sizes, and wherein y bits of the buffer-size mask have a first logic state and the remaining x-y bits have a second logic state, where 2y equals the retrieved message buffer size value, in terms of number of bytes; and, determines a message buffer-fullness status of the message buffer associated with the designated receive message object using the retrieved incremented address pointer value and the message buffer-size mask.