When a Tx Event FIFO full condition is signalled by IR[TEFF], no further elements are
written to the Tx Event FIFO until at least one element has been read out and the Tx
Event FIFO Get Index has been incremented. In case a Tx event occurs while the Tx
Event FIFO is full, this event is discarded and interrupt flag IR[TEFL] is set.
To avoid a Tx Event FIFO overflow, the Tx Event FIFO watermark can be used. When
the Tx Event FIFO fill level reaches the Tx Event FIFO watermark configured by
TXEFC[EFWM], interrupt flag IR[TEFW] is set.
When reading from the Tx Event FIFO, two times the Tx Event FIFO Get Index
TXEFS[EFGI] has to be added to the Tx Event FIFO start address TXEFC[EFSA].
3.5.6 FIFO Acknowledge Handling
The Get Indices of Rx FIFO 0, Rx FIFO 1, and the Tx Event FIFO are controlled by
writing to the corresponding FIFO Acknowledge Index (see the registers RXF0A ,
RXF1A, and TXEFA). Writing to the FIFO Acknowledge Index will set the FIFO Get
Index to the FIFO Acknowledge Index plus one and thereby updates the FIFO Fill Level.
There are two use cases:
• When only a single element has been read from the FIFO (the one being pointed to
by the Get Index), this Get Index value is written to the FIFO Acknowledge Index.
• When a sequence of elements has been read from the FIFO, it is sufficient to write
the FIFO Acknowledge Index only once at the end of that read sequence (value:
Index of the last element read), to update the FIFO's Get Index.
Due to the fact that the CPU has free access to the M_CAN's Message RAM, special care
has to be taken when reading FIFO elements in an arbitrary order (Get Index not
considered). This might be useful when reading a High Priority Message from one of the
two Rx FIFOs. In this case the FIFO's Acknowledge Index should not be written because
this would set the Get Index to a wrong position and also alters the FIFO's Fill Level. In
this case some of the older FIFO elements would be lost.
Note
The application has to ensure that a valid value is written to the
FIFO Acknowledge Index. The M_CAN does not check for
erroneous values.
Functional Description
MPC5777C Reference Manual Addendum, Rev. 1, 12/2015
114 Freescale Semiconductor, Inc.