14.10.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 CxFIFOSTAx register. The RX FIFO is not empty if TFNRFNIF is set.
The RX FIFO user address (CxFIFOUAx) 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 (CxFIFOCONx[8]). This will make the CAN FD Protocol module increment to the tail of the FIFO and update CxFIFOUAx.
Now the application can read the next message from the RX FIFO.
Words | Bits | Bit 31/23/15/7 | Bit 30/22/14/6 | Bit 29/21/13/5 | Bit 28/20/12/4 | Bit 27/19/11/3 | Bit 26/18/10/2 | Bit 25/17/9/1 | Bit 24/16/8/0 |
---|---|---|---|---|---|---|---|---|---|
R0 | 31:24 | — | — | SID11 | EID[17:6] | ||||
23:16 | EID[12:5] | ||||||||
15:8 | EID[4:0] | SID[10:8] | |||||||
7:0 | SID[7:0] | ||||||||
R1 | 31:24 | — | — | — | — | — | — | — | — |
23:16 | — | — | — | — | — | — | — | — | |
15:8 | FILHIT[4:0] | — | — | ESI | |||||
7:0 | FDF | BRS | RTR | IDE | DLC[3:0] | ||||
R2 | 31:24 | RXMSGTS[31:24] | |||||||
23:16 | RXMSGTS[23:16] | ||||||||
15:8 | RXMSGTS[15:8] | ||||||||
7:0 | RXMSGTS[7:0] | ||||||||
R3 | 31:24 | Receive Buffer Data Byte 3 | |||||||
23:16 | Receive Buffer Data Byte 2 | ||||||||
15:8 | Receive Buffer Data Byte 1 | ||||||||
7:0 | Receive Buffer Data Byte 0 | ||||||||
R4 | 31:24 | Receive Buffer Data Byte 7 | |||||||
23:16 | Receive Buffer Data Byte 6 | ||||||||
15:8 | Receive Buffer Data Byte 5 | ||||||||
7:0 | Receive Buffer Data Byte 4 | ||||||||
Ri | 31:24 | Receive Buffer Data Byte n | |||||||
23:16 | Receive Buffer Data Byte n-1 | ||||||||
15:8 | Receive Buffer Data Byte n-2 | ||||||||
7:0 | Receive Buffer Data Byte n-3 |
bit R0.31-30 | Unimplemented: Read as ‘x’ |
bit R0.29 | SID11: In FD mode, the standard ID can be extended to 12 bit using r1. |
bit R0.28-11 | EID[17:0]: Extended Identifier |
bit R0.10-0 | SID[10:0]: Standard Identifier |
bit R1.31-16 | Unimplemented: Read as ‘x’ |
bit R1.15-11 | FILHIT[4:0]: Filter Hit, number of filter that matched |
bit R1.10-9 | Unimplemented: Read as ‘x’ |
bit R1.8 |
ESI: Error Status Indicator
|
bit R1.7 | FDF: FD Frame; distinguishes between CAN and CAN FD formats. |
bit R1.6 | BRS: Bit Rate Switch; selects if data bit rate is switched. |
bit R1.5 | RTR: Remote Transmission Request; not used in CAN FD. |
bit R1.4 | IDE: Identifier Extension Flag; distinguishes between base and extended format. |
bit R1.3-0 | DLC[3:0]: Data Length Code |
bit R2.31-0 | RXMSGTS[32:0]: Receive Message Timestamp |