How should I configure receiving multi-ID messages without USING FIFO?
need to filter the receiving message ID
It is possible to filter messages that receive multiple ids using FIFO mode
Hello Zheng,
In the module, there's a way to filter the messages received using the RXIMRx register that contains the individual mask.
If you're using the SDK, you could check the FLEXCAN_SetRxMsgBuff or CAN_ConfigRxBuff APIs to know how to set the filter.
Best Regards,
Alexis Andalon
Hello Alexis,
I have two more questions,
In this API interface, if I need to receive messages with multiple ids, do I need to configure multiple receiving mailboxes?
If I need to receive multiple messages, I should receive multiple mailbox messages in a loop, right?
Best Regards,
Zheng Yu
Hello Zheng,
If configure only the mailbox you would only be able to receive an ID, but if you enable the individual mask you would be able to receive more than one ID.
For example, if you have the ID = 0x700 and set the mask to 0x7FE you will be able to receive the ID = 0x700 and 0x701.
The description of this field is the next one:
So if you set any bit in the mask to 0, will not matter in any state you received this bit in the ID it will let it pass to the mailbox.
Best Regards,
Alexis Andalon
Hello Alexis,
I need to ask you two more questions。
I understand this API. A mailbox can only match a message with one id. Is that true?
If I need to receive messages with multiple ids, I need to configure multiple receiving mailboxes, and do I need to receive messages from multiple mailboxes in a loop?
Best Regards,
Zheng Yu