Hi All !
I have a working CANOpen stack for which I have developed the TIva driver. I'm running it on TIVA Launchpad (TM4C123G) However, currently this is working without using Tiva hardware FIFO.
I wanted to implement HW buffers, but I wasn't able to find a good example. The configuration of the FIFO is clear - that's ok, but the correct handling of the interrupt is
somewhat confusing to me.
If I understand correctly...you get a CAN interrupt for every FIFO member object reception. But then what's the point
placing the FIFO reading inside the interrupt routine ? ( as seen at page 1059 of the datasheet : Figure 17-3. Message Objects in a FIFO Buffer )
If you get an interrupt for every FIFO member, and you read it immediately, the FIFO has no chance to fill up.
The above algorithm clearly shows reading the message inside the ISR.
It makes no sense for me, but obviously I''m missing something here...
If you place the FIFO read into your main loop, or you time it with a another timer, the FIFO has a chance to fill up...but then what's the point having IRQ
for every FIFO member ( you can read the FIFO member status outside the ISR also ).
Thanks for the answers.