AnsweredAssumed Answered

SetRxFifoGlobalMask behavior

Question asked by Andy Dong on Apr 7, 2020
Latest reply on Apr 8, 2020 by Andy Dong

Hi,

 

I used imxrt1050 and SDK is 2.6.1

below is my settings

uint32_t rxFifoFilter[] = {FLEXCAN_RX_FIFO_STD_FILTER_TYPE_A(0x3c0, 0, 0)};

rxFifoConfig.idFilterNum = sizeof(rxFifoFilter) / sizeof(rxFifoFilter[0]);
rxFifoConfig.idFilterTable = rxFifoFilter;
rxFifoConfig.idFilterType = kFLEXCAN_RxFifoFilterTypeA;
rxFifoConfig.priority = kFLEXCAN_RxFifoPrioHigh;
FLEXCAN_SetRxFifoConfig(EXAMPLE_CAN, &rxFifoConfig, true);

FLEXCAN_SetRxFifoGlobalMask(EXAMPLE_CAN,FLEXCAN_RX_FIFO_STD_MASK_TYPE_A(0x198,0,0));


txFrame.format = kFLEXCAN_FrameFormatStandard;
txFrame.type   = kFLEXCAN_FrameTypeData;
txFrame.id     = FLEXCAN_ID_STD(0x7ff);
txFrame.length = DLC;

txFrame2.format = kFLEXCAN_FrameFormatStandard;
txFrame2.type   = kFLEXCAN_FrameTypeData;
txFrame2.id     =
FLEXCAN_ID_STD(0x7c0);
txFrame2.length = DLC;

 

In this condition, why I still receive the txFrame ? 

the txFrame ID didn't match.

Filter         =  0x  1  1110 0000 00000000000000000000
Mask        =  0x      1100 1100 00000000000000000000

txFrame   =  0x 11  1111 1111 1000000000000000000- 
txFrame2 =  0x 11  1110 0000 0000000000000000000- 

 

 

 

and what's the difference between RxFifoGlobalMask and RxIndividualMask ?

thanks

 

Best Regareds,

Andy Dong

Outcomes