s32K144 CAN0 RXIMR registers doesn't work wellt

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

s32K144 CAN0 RXIMR registers doesn't work wellt

Jump to solution
2,688 Views
shingozhou
Contributor III

Hi, I have a question about RXIMR register of instance CAN0 using SDK 0.8.4 release.

Inorder to receive the can frame those ID between 0x500 to 0x57F and FLEXCAN_RX_FIFO_ID_FORMAT_A, I use RxFiFo filter, and set the related register belows:

1. CAN0->RAMn[24 + 0] = ((0x500 << FLEXCAN_RX_FIFO_ID_FILTER_FORMATA_STD_SHIFT) &       FLEXCAN_RX_FIFO_ID_FILTER_FORMATA_STD_MASK);

2. CAN0->RXIMR[0] = (0x780 << CAN_ID_STD_SHIFT) & CAN_ID_STD_MASK;

But the result is that CAN0 could only receive the incoming frame which ID is 0x500, and it does not achieve my requirements. So, Is there no distinction betwen setting RXIMR = 0xFFFFFFFF and RXIMR = (0x780 << CAN_ID_STD_SHIFT)? The RXIMRs register are not useful register?

Best regards,

shingo

Labels (1)
Tags (1)
1 Solution
2,153 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

do you have CAN_MCR[IMRQ] set?

The CAN_MCR[IRMQ] bit determines which mask register is used for the RXFIFO ID table elements.

If CAN_MCR[IRMQ]=0 then all ID Table is affected by RXFGMASK. If CAN_MCR[IRMQ]=1, elements in ID table are affected by Individual Mask Registers (RXIMRx) according setting of CTRL2[RFFN].

BR, Petr

View solution in original post

4 Replies
2,154 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

do you have CAN_MCR[IMRQ] set?

The CAN_MCR[IRMQ] bit determines which mask register is used for the RXFIFO ID table elements.

If CAN_MCR[IRMQ]=0 then all ID Table is affected by RXFGMASK. If CAN_MCR[IRMQ]=1, elements in ID table are affected by Individual Mask Registers (RXIMRx) according setting of CTRL2[RFFN].

BR, Petr

2,153 Views
shingozhou
Contributor III

Petr:

How many elements are there in the register CAN_RXIMR? On one hande, it have 32 in the Reference Manual, On the other hand it have 16 In the SDK 0.8.4 release. Could I modify the macro definition directly in the SDK?

1526284634(1).png

1526284581(1).png

0 Kudos
2,153 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

on the S32K144 FlexCAN_0 has 32 MBs and so 32 RXIMRs. FlexCAN_1 and FlexCAN_2 modules have 16 MBs and 16 RXIMRs.

You can modify the header file, but also you have to reduce the length of RESERVED_6 array accordingly.

The header in the SDK 0.8.6 has 32 for CAN_RXIMR_COUNT.

BR, Petr

2,153 Views
shingozhou
Contributor III

Petr:

Thank you for you advice!

It's successful to solve the problem.

BR,

shingo 

0 Kudos