38.8.1.1 Reading a Receive Message Object

Before reading a receive message object, the application must ensure that the RX FIFO is not empty by reading the CxFIFOSTAy register. The RX FIFO is not empty if TFNRFNIF is set.

The RX FIFO user address (CxFIFOUAy) points to the RAM of the next receive message object to read. R0 of the receive message object is read first, followed by R1, R2 and so on.

After the receive message object is read from RAM, the RX FIFO needs to be incremented by setting the UINC bit (CxFIFOCONy[8]). This will make the CAN FD Protocol module increment to the tail of the FIFO and update CxFIFOUAy.

Now the application can read the next message from the RX FIFO.

Table 38-10. Receive Message Object
Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 SID[7:0]
1 EID[4:0] SID[10:8]
2 EID[12:5]
3 - - SID11 EID[17:13]
4 FILHIT[4:0] - - ESI
5 FDF BRS RTR IDE DLC[3:0]
6 - - - - - - - -
7 - - - - - - - -
8 Receive Data Byte 0
9 Receive Data Byte 1
10 Receive Data Byte 2
11 Receive Data Byte 3
12 Receive Data Byte 4
13 Receive Data Byte 5
14 Receive Data Byte 6
15 Receive Data Byte 7
…………………………………………………………………………………………………………………………………………………
m-3 Receive Data Byte n-3
m-2 Receive Data Byte n-2
m-1 Receive Data Byte n-1
m Receive Data Byte n

bit 15-11 EID[4:0]: Extended Identifier bits

bit 10-0 SID[10:0]: Standard Identifier bits

bit 15-14 Unimplemented: Read as ‘x

bit 13 SID11: In FD mode, the Standard ID can be extended to 12 bits using r1 bit

bit 12-0 EID[17:5]: Extended Identifier bits

bit 10-9 Unimplemented: Read as ‘x

bit 8 ESI: Error Status Indicator bit - In CAN-to-CAN Gateway mode (ESIGM = 1), the transmitted ESI flag is a “logical OR” of ESI and the Error Passive state of the CAN controller.

In Normal mode, ESI indicates the error status:

1 = Transmitting node is error passive

0 = Transmitting node is error active

bit 7 FDF: FD Frame bit - distinguishes between CAN and CAN FD formats

bit 6 BRS: Bit Rate Switch bit - selects if Data Bit Rate is switched

bit 5 RTR: Remote Transmission Request bit (not used in CAN FD)

bit 4 IDE: Identifier Extension bit - distinguishes between base and extended format.

bit 3-0 DLC[3:0]: Data Length Code bits

bit 15:0 Unimplemented: Read as ‘x

bit 15:0 RXMSGTS[15:0]: Receive Message Timestamp bits

bit 15:0 RXMSGTS[31:16]: Receive Message Timestamp bits

Note:
  1. Receive Message Object: Data Bytes 0-n; payload size is configured individually with the PLSIZE[2:0] bits.
  2. R2 (RXMSGTSx) only exists in objects where RXTSEN is set.