Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
543 views
in Technique[技术] by (71.8m points)

buffer - 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.

question from:https://stackoverflow.com/questions/65860916/what-is-advantage-of-can-rx-fifo

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...