The BUF7I to BUF5I flags are used to represent FIFO interrupts when the Rx FIFO
is enabled, so the first received CAN message will set the BUF5I flag in IFLAG1, but that won't tell me which filter was matched to cause the interrupt. I want to know which ID was hit. I thought CANx_RXFIR would have the Identifier Acceptance Filter Hit Indicator that would tell me which Identifier Acceptance Filter was hit by the received message but it is always zero.
Each ID to match on the receive is set as follows
FLEXCAN_SetRxIndividualMask(CAN0,currentFifo, FLEXCAN_RX_MB_STD_MASK(0x71F, 0, 0));
rxFifoFilter[currentFifo++ ] = FLEXCAN_RX_FIFO_STD_FILTER_TYPE_A(cob_id, rtr, 0);
THen the full table with the filters is configured as follows, to get the interrupt on the match
rxFifoConfig.idFilterTable = rxFifoFilter;
rxFifoConfig.idFilterType = kFLEXCAN_RxFifoFilterTypeA;
rxFifoConfig.idFilterNum = currentFifo;//sizeof(rxFifoFilter) / sizeof(rxFifoFilter[0]);
rxFifoConfig.priority = kFLEXCAN_RxFifoPrioHigh;
FLEXCAN_SetRxFifoGlobalMask(CAN0,FLEXCAN_RX_MB_STD_MASK(0x71F, 0, 0));
FLEXCAN_SetRxFifoConfig(CAN0, &rxFifoConfig, true);
/* Start receive data through Rx Message Buffer. */
FLEXCAN_TransferReceiveFifoNonBlocking(CAN0, &flexcanHandle, &FifoFrame);
FLEXCAN_EnableMbInterrupts(CAN0,kFLEXCAN_RxFifoFrameAvlFlag);
What am I missing?