Search code examples
buffermessagefifocan-busautosar

what is advantage of can rx fifo?


I am very interested in AUTOSAR. I studied CAN message buffer and CAN Rx FIFO. I understood thart CAN Rx FiFO is collection of message box.
I have a question. When using the CAN message buffer, it is known that the can message id in the range is processed first through message filtering. If fifo is a collection of message buffer, I think the only advantage is memory. Is that all? I'm really curious about the reason to use CAN RX FIFO.


Solution

  • This depends a lot on the specific CAN controller hardware used. But in general, yes, message id filtering and acceptance masking (if used) is applied before a message ends up in Rx FIFO.

    The reason behind having a Rx FIFO is simply to allow your program some time to do other things, while there are incoming messages. When you inspect the FIFO, it is often best to do so until you've read all messages and emptied the FIFO.

    The more modern/advanced CAN controllers uses something called "mailboxes" where specific CAN identifiers you are interested in end up in their own dedicated "mailbox" message buffer. The setup then is to have dedicated mailbox for all high priority messages you expect, and leave the RX FIFO for low priority stuff and/or messages that you aren't interested in.