How to set CAN rx filter

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

How to set CAN rx filter

Jump to solution
1,248 Views
JungkyuHan1
Contributor II

Using KW38

I want to make a CAN RX filter

ex: 0x18FFB034 ~ 0x18FFB534 , 0x19FFB028

 

Please Guide me.

Thanks

0 Kudos
Reply
1 Solution
1,187 Views
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.

View solution in original post

2 Replies
1,172 Views
JungkyuHan1
Contributor II
[Shelf Solved]
need 1bit shift toward register.

base->RXFGMASK = 0x10FFB034<<1;
0 Kudos
Reply
1,188 Views
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.