RM0046 FlexCAN
Doc ID 16912 Rev 5 567/936
with the next frame in the queue, and then issue another interrupt to the CPU. If the FIFO is
full and more frames continue to be received, an OVERFLOW interrupt is issued to the CPU
and subsequent frames are not accepted until the CPU creates space in the FIFO by
reading one or more frames. A warning interrupt is also generated when 4frames are
accumulated in the FIFO.
A powerful filtering scheme is provided to accept only frames intended for the target
application, thus reducing the interrupt servicing work load. The filtering criteria is specified
by programming a table of 8 32-bit registers that can be configured to one of the following
formats (see also Section 22.3.3, “Rx FIFO structure):
● Format A: 8 extended or standard IDs (including IDE and RTR)
● Format B: 16 standard IDs or 16 extended 14-bit ID slices (including IDE and RTR)
● Format C: 32 standard or extended 8-bit ID slices
Note: A chosen format is applied to all 8 registers of the filter table. It is not possible to mix formats
within the table.
The eight elements of the filter table are individually affected by the first eight Individual
Mask Registers (RXIMR0–RXIMR7), allowing very powerful filtering criteria to be defined.
The rest of the RXIMR, starting from RXIM8, continue to affect the regular MBs, starting
from MB8. If the BCC bit is negated (or if the RXIMR are not available for the particular
MCU), then the FIFO filter table is affected by the legacy mask registers as follows: element
6 is affected by RX14MASK, element 7 is affected by RX15MASK and the other elements (0
to 5) are affected by RXGMASK.
22.4.8 CAN protocol related features
Remote frames
Remote frame is a special kind of frame. The user can program a MB to be a Request
Remote Frame by writing the MB as Transmit with the RTR bit set to 1. After the Remote
Request frame is transmitted successfully, the MB becomes a Receive Message Buffer, with
the same ID as before.
When a Remote Request frame is received by FlexCAN, its ID is compared to the IDs of the
transmit message buffers with the Code field ‘1010’. If there is a matching ID, then this MB
frame will be transmitted. Note that if the matching MB has the RTR bit set, then FlexCAN
will transmit a Remote Frame as a response.
A received Remote Request Frame is not stored in a receive buffer. It is only used to trigger
a transmission of a frame in response. The mask registers are not used in remote frame
matching, and all ID bits (except RTR) of the incoming received frame should match.
In the case that a Remote Request Frame was received and matched an MB, this message
buffer immediately enters the internal arbitration process, but is considered as normal Tx
MB, with no higher priority. The data length of this frame is independent of the DLC field in
the remote frame that initiated its transmission.
If the Rx FIFO is enabled (bit FEN set in MCR), FlexCAN will not generate an automatic
response for Remote Request Frames that match the FIFO filtering criteria. If the remote
frame matches one of the target IDs, it will be stored in the FIFO and presented to the CPU.
Note that for filtering formats A and B, it is possible to select whether remote frames are
accepted or not. For format C, remote frames are always accepted (if they match the ID).