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.
已解决! 转到解答。
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
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
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