How to set CAN rx filter

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to set CAN rx filter

跳至解决方案
1,258 次查看
JungkyuHan1
Contributor II

Using KW38

I want to make a CAN RX filter

ex: 0x18FFB034 ~ 0x18FFB534 , 0x19FFB028

 

Please Guide me.

Thanks

0 项奖励
回复
1 解答
1,197 次查看
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @JungkyuHan1

CAN controller affiliated with each node implements a filter that checks the arbitration ID of a broadcast message and either accepts messages when the arbitration ID is within a particular range, or ignores messages outside of that range. Matching to a range of IDs should be possible by using ID acceptance masks. FlexCAN supports individual masking per MB (IRMQ bit set) or global masking scheme (IRMQ cleared). 

Although there may not be specific documentation for this scenario, I will recommend you checking the MCUXpresso SDK API Reference Manual_MKW38 included in KW38 SDK documentation > docs folder. Chapter 14 describes the peripheral driver for FlexCAN module; please refer to "Configuration" APIs.

Just for reference, you can take a look at the Controller Area Network (CAN) standard - NXP Community.

Regards,
Eduardo.

在原帖中查看解决方案

2 回复数
1,182 次查看
JungkyuHan1
Contributor II
[Shelf Solved]
need 1bit shift toward register.

base->RXFGMASK = 0x10FFB034<<1;
0 项奖励
回复
1,198 次查看
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @JungkyuHan1

CAN controller affiliated with each node implements a filter that checks the arbitration ID of a broadcast message and either accepts messages when the arbitration ID is within a particular range, or ignores messages outside of that range. Matching to a range of IDs should be possible by using ID acceptance masks. FlexCAN supports individual masking per MB (IRMQ bit set) or global masking scheme (IRMQ cleared). 

Although there may not be specific documentation for this scenario, I will recommend you checking the MCUXpresso SDK API Reference Manual_MKW38 included in KW38 SDK documentation > docs folder. Chapter 14 describes the peripheral driver for FlexCAN module; please refer to "Configuration" APIs.

Just for reference, you can take a look at the Controller Area Network (CAN) standard - NXP Community.

Regards,
Eduardo.