S32K118 CAN RX MB MASK

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

S32K118 CAN RX MB MASK

Jump to solution
394 Views
Pohsuan
Contributor III

Hello NXP team,

I'm trying to configure the CAN RX message buffer global mask, based on the reference article in the link below.

https://community.nxp.com/t5/S32K-Knowledge-Base/S32K1xx-FlexCAN-Mask-Setting-Demo/ta-p/1519753

https://community.nxp.com/t5/S32K/S32K344-FlexCAN-How-to-setup-Rx-MB-mask-to-receive-the-CAN-FD/m-p/...

 

However, on my current CAN bus setup, I can only receive messages with IDs 0x300 and 0x400. I’m not able to receive IDs in the ranges 0x301 ~ 0x37F and 0x401 ~ 0x47F.

Am I missing any configuration?

Please check my project as attachment, and provide me some advice, Thank you!

 

Tags (1)
0 Kudos
Reply
1 Solution
369 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if receiving std ID you need to shift mask accordingly. The API does not do any shifting for mask register setup. So use

FlexCAN_Ip_SetRxMbGlobalMask(INST_FLEXCAN_0, 0x780<<18);

BR, Petr

View solution in original post

0 Kudos
Reply
2 Replies
370 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if receiving std ID you need to shift mask accordingly. The API does not do any shifting for mask register setup. So use

FlexCAN_Ip_SetRxMbGlobalMask(INST_FLEXCAN_0, 0x780<<18);

BR, Petr

0 Kudos
Reply
355 Views
Pohsuan
Contributor III

Hello PetrS,

Thank you for your guidance. I was able to successfully receive the CAN messages.

When I using FlexCAN_Ip_SetRxMbGlobalMask, I needed to left-shift the mask value by 18 bits.
Is this behavior related to the version of the RTD library, or is it due to differences between the S32K118 and S32K344?

For reference, I’m currently using:
S32K1_RTD_2_0_0_P04_D2404_ASR_REL_4_7_REV_0000_20240417

Pohsuan_0-1746583811029.png

 

Tags (1)
0 Kudos
Reply