SPC5748G FLEXCAN FIFO DMA Data loss

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPC5748G FLEXCAN FIFO DMA Data loss

Jump to solution
507 Views
longfeiwang
Contributor III

I use DMA to accept CAN bus RX data from ECU。But in fifo + dma mode, it may be that fifo can only store up to 5 messages,If at this time the ECU sends 10 messages,There must be a situation where the first five messages are received and the interrupt is entered, causing the following five messages to be lost。Is there a better way to avoid data loss on the CAN bus?

0 Kudos
1 Solution
431 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

the RXFIFO can store up to 6 messages and it is up to used to read it out so another message can be stored in RXFIFO otherwise further messages can be lost for sure. Ideally you could have IFLAG1[BUF5I] interrupt enabled so it will be called if  there is message available in the RXFIFO. If DMA is used then DMA request to read single message from RXFIFO is generated on IFLAG1[BUF5I] flag. If teh DMA is not blocked by higher priority DMA transfers, you should not see a situation you outlined.

BR, Petr 

View solution in original post

0 Kudos
1 Reply
432 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

the RXFIFO can store up to 6 messages and it is up to used to read it out so another message can be stored in RXFIFO otherwise further messages can be lost for sure. Ideally you could have IFLAG1[BUF5I] interrupt enabled so it will be called if  there is message available in the RXFIFO. If DMA is used then DMA request to read single message from RXFIFO is generated on IFLAG1[BUF5I] flag. If teh DMA is not blocked by higher priority DMA transfers, you should not see a situation you outlined.

BR, Petr 

0 Kudos