Hey guys,
we're currently experiencing some troubles with reading a DCAN Rx FIFO on a TMS570LS3137 while having bursts transfers on the bus. It seems as if messages are getting out of order or even getting lost. The protocol above is not working reliably therefore.
I already had a very careful look at the TRM for the TMS570 but there are still some details I'd need more information about. From my point of view, the TRM is not detailed enough regarding the FIFO operation mode.
The main question is, what the CAN core is doing when the software is reading out a FIFO while new frames are getting from the bus, targeting the same FIFO?
- Does the CAN core place any new message to the starting position of the FIFO?
This would indicate, that we need to read out the FIFO as fast as possible without allowing anything to interrupt us to be sure the reading happens faster than the writing. - Does the CAN core place any new message to the next higher free slot after the highest used one as long as the FIFO was not totally emptied (no active NewDat flags)?
Would a loop based reading mechanism until no "NewDat" flag is found automatically prevent this?
To make it even more difficult, we'd like to use the DCAN in two different ways (application dependent):
- Having Rx interrupts enabled (for every single message object in the FIFO).
- Using polling mode only
Is there any different software handling needed to guarantee a perfectly fine in-order reception?
Independent if using interrupt or polling mode: Can there be any situation where we need to start reading from another position than 1?
The only partly useful information, I could find in the TRM is the flowchart on page 1187. But this does not contain any text as an explanation (like polling mode, sequences, usage of multiple FIFOs, etc.).
Thank you very much in advance.
Regards,
Michael