SPRAD59 October 2023 TMS320F280039
Filter configurations to store a matching frame into Rx FIFO have been described above.
Note: The following discussion can be applied separately to either of the Rx FIFOs.
There are a number of ways to read a new message. Separate interrupts can be generated when any new message is received in a FIFO element or when the FIFO becomes full (size of the FIFO set during Message RAM configuration). To avoid losing data on account of the FIFO being full, it is also possible to set a watermark (during Message RAM configuration). When the FIFO fill level reaches the set watermark, an interrupt is generated which can be used to read the entire FIFO (see Figure 8-4).
The new message (or messages) can be read directly from the Message RAM using Driverlib API after which the Get index needs to be incremented. This can be done by writing the index of the last element read to the register MCAN_RXFxA, which is done using a Driverlib API as shown below.
To read multiple messages from the FIFO, the same code can be called in a loop.