Setting iMXRT1176 FlexCAN filter bits

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

Setting iMXRT1176 FlexCAN filter bits

Jump to solution
1,087 Views
rnicolls
Contributor III

Hi,

I'm currently working with the FlexCAN module of the iMXRT1176 and trying to understand how to set the id filter bits for Message Buffers. 

My understanding is I can, for example, write a mask to the register RXMGMASK to identify which bits I want to use for the filter but I'm unsure where I write the actual filter. 

If I'm trying to filter the ID, would I write the desired ID to the ID register of the Message Buffer and this will be used as the filter? If that's the case, will the don't care bits of the ID be overwritten by the received message?

Thanks.

0 Kudos
Reply
1 Solution
1,080 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

First of all, sorry for the later reply.

The register RXMGMASK would take effective based on [IRMQ] bit of Module Configuration Register (CANx_MCR) Setting. [IRMQ] bit indicates whether Rx matching process will be based either on individual masking and queue or on masking scheme with RXMGMASK, RX14MASK and RX15MASK, RXFGMASK.

If RXMGMASK register set to 0x1FFFFFFF, that means only the RX message buffer set ID frame could be received. For example, if there only with one RX message buffer set ID is 0x123, only the CAN Frame with the ID 0x123 can pass the filter. The other CAN ID frame would be filtered.

If  RXMGMASK register set to 0x0, that means all CAN frame could be received. The CAN node working as a sniffer. 

Wish it helps.

Mike

View solution in original post

0 Kudos
Reply
3 Replies
1,077 Views
rnicolls
Contributor III

Hi Mike,

Yes, I found your response helpful. 

Thank you. 

0 Kudos
Reply
1,081 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

First of all, sorry for the later reply.

The register RXMGMASK would take effective based on [IRMQ] bit of Module Configuration Register (CANx_MCR) Setting. [IRMQ] bit indicates whether Rx matching process will be based either on individual masking and queue or on masking scheme with RXMGMASK, RX14MASK and RX15MASK, RXFGMASK.

If RXMGMASK register set to 0x1FFFFFFF, that means only the RX message buffer set ID frame could be received. For example, if there only with one RX message buffer set ID is 0x123, only the CAN Frame with the ID 0x123 can pass the filter. The other CAN ID frame would be filtered.

If  RXMGMASK register set to 0x0, that means all CAN frame could be received. The CAN node working as a sniffer. 

Wish it helps.

Mike

0 Kudos
Reply
713 Views
max_yang1
Contributor III

It is very interesting to see this old post when I searched for suggestion for exact the same problem you had. However this time, on my target RT1064, the setting disabling self-receive does work for me. 

 

Max

0 Kudos
Reply