s32k116 ,How should I configure receiving multi-ID messages without USING FIFO?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s32k116 ,How should I configure receiving multi-ID messages without USING FIFO?

1,066 Views
972276616
Contributor II

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

0 Kudos
4 Replies

997 Views
Alexis_A
NXP TechSupport
NXP TechSupport

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

0 Kudos

997 Views
972276616
Contributor II

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?

pastedImage_1.png

If I need to receive multiple messages, I should receive multiple mailbox messages in a loop, right?

pastedImage_2.png

Best Regards,

Zheng Yu

0 Kudos

997 Views
Alexis_A
NXP TechSupport
NXP TechSupport

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:

pastedImage_1.png

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

0 Kudos

997 Views
972276616
Contributor II

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?

pastedImage_1.png

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?

pastedImage_2.png

Best Regards,

Zheng Yu

0 Kudos