This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280039C: MCAN - How to reset the Rx FIFO

Part Number: TMS320F280039C

Hello support,

what I hasv to do if I want to reset the Rx FIFO ?

TRM states

"The following registers are reset when the MCAN_CCCR.CCE bit is set:
MCAN_HPMS - High Priority Message Status
MCAN_RXF0S - Rx FIFO 0 Status
MCAN_RFX1S - Rx FIFO 1 Status
MCAN_TXFQS - Tx FIFO/Queue Status
MCAN_TXBRP - Tx Buffer Request Pending
MCAN_TXBTO - Tx Buffer Transmission Occurred
MCAN_TXBCF - Tx Buffer Cancellation Finished
MCAN_TXEFS - Tx Event FIFO Status"

Is there another way, involving only RX FIFO, to reset Rx FIFO PutIndex and GetIndex ?

  • Is there another way, involving only RX FIFO, to reset Rx FIFO PutIndex and GetIndex ?

    Yes. Please consider the following points:

    - Resetting Put Index and Get Index serves no purpose, the only important consideration is the difference or the Fill Level. For eg. if the FIFO size is 6, Put index is 5, Get index is 2 and a frame is received in the FIFO, the Put Index will automatically switch to zero and subsequently keep incrementing from there. In this way, the indices are updated cyclically, hence, there is no real need to reset both to zero. 

    - Both Put Index and Get Index cannot be written to directly. Put index is incremented on receiving a frame, whereas the Get Index can be incremented by writing to the FIFO Acknowledgment Index. If there is a need to reset the indices without resetting the module, the application can run a loop, where the Get index is incremented (by writing to FIFO Ack) till the fill level is 0.

    Thanks.