Flexcan indivisual mask

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

Flexcan indivisual mask

203 Views
PaoloRB
Contributor I

Good morning. I'm using MIMXRT1170-EVKB and I'm trying to understand how the individual mask for the can frames works. I'm able to receive all frame simply set the mask 0x000. Now, I need to filter ids from 600-6FF. Based on the datasheet info, the mask would be 0bF00, so only care about bits 8 to 11. doing that I'm still able to receive frames like 412. Not sure how the mask is supposed to be set and how the mbConfig.id has to be. 

setting mbConfig.id = 123 and mask 0xFFF I will correctly be able to receive only that frame but I need to set a range.

 

Thanks in advance for any clarification

0 Kudos
Reply
2 Replies

160 Views
mayliu1
NXP Employee
NXP Employee

Dear @PaoloRB ,

 

Thank you for your interest in the NXP MIMXRT product, I would  like to provide service for you.

Please pay attention to the following setting, I use my MIMXRT1170-EVKB board, I can receive CAN id from 0x600~0x6FF.

1: FLEXCAN_SetRxMbGlobalMask; 

mayliu1_0-1730461306895.png

0b - The corresponding bit in the filter is "don't care."
1b - The corresponding bit in the filter is checked.

2:FLEXCAN_SetRxIndividualMask

mayliu1_2-1730461424226.png

mayliu1_1-1730461337770.png

Please try it.

Wish it helps you.
If you still have question about it, please kindly let me know.

 

Best Regards

mayliu

 

0 Kudos
Reply

199 Views
PaoloRB
Contributor I
I wrote 0bF00 but it was 0xF00, just to be clear.
0 Kudos
Reply