XC886/888CLM
Controller Area Network (MultiCAN) Controller
User’s Manual
15-34
V1.3, 2010-02
MultiCAN, V1.0
15.1.9.4
Message Object FIFO Structure
In case of high CPU load it may be difficult to process a series of CAN frames in time.
This may happen if multiple messages are received or must be transmitted in short time.
Therefore, a FIFO buffer structure is available to avoid loss of incoming messages and
to minimize the setup time for outgoing messages. The FIFO structure can also be used
to automate the reception or transmission of a series of CAN messages and to generate
a single message interrupt when the whole CAN frame series is done.
There can be several FIFOs in parallel. The number of FIFOs and their size are only
limited by the number of available message objects. A FIFO can be installed, resized and
de-installed at any time, even during CAN operation.
The basic structure of a FIFO is shown in
object and n slave objects. The slave objects are chained together in a list structure
(similar as in message object lists). The base object may be allocated to any list.
Although
shows the base object as a separate part beside the slave
objects, it is also possible to integrate the base object at any place into the chain of slave
objects. This means that the base object is slave object, too (not possible for gateways).
The absolute object numbers of the message objects have no impact on the operation
of the FIFO.
The base object need not to be allocated to the same list as the slave objects. Only the
slave object must be allocated to a common list (as they are chained together). Several
pointers (BOT, CUR and TOP) that are located in the Register MOFGPRn link the base
object to the slave objects, regardless whether the base object is allocated to the same
or to another
list
than the slave objects.
The smallest FIFO would be a single message object which is both FIFO base and FIFO
slave (not very useful). The biggest possible FIFO structure would include all message
objects of the MultiCAN module. Any FIFO sizes between these limits are possible.
In the FIFO base object, the FIFO boundaries are defined. Bit field MOFGPRn.BOT of
the base object points to (includes the number of) the bottom slave object in the FIFO
structure. The MOFGPRn.TOP bit field points to (includes the number of) the top slave
object in the FIFO structure. The MOFGPRn.CUR bit field points to (includes the number
of) the slave object that is actually selected by the MultiCAN module for message
transfer. When a message transfer occurs with this object, CUR is set to the next
message object in the list structure of the slave objects (CUR = PNEXT of current
object). If CUR was equal to TOP (top of the FIFO reached), the next update of CUR will
result in CUR = BOT (wrapped around from the top to the bottom of the FIFO). This
scheme represents a circular FIFO structure where the bit fields BOT and TOP establish
the link from the last to the first element.
Bit field MOFGPRn.SEL of the base object can be used for monitoring purposes. It
allows a slave object to be defined within the list at which a message interrupt is
generated whenever the CUR pointer reaches the value of the SEL pointer. Thus, SEL
*