AnsweredAssumed Answered

KW36 flexcan how to receive all CAN id

Question asked by mo xinyu on Jun 5, 2020
Latest reply on Jul 13, 2020 by mo xinyu

I am using frdmkw36_driver_examples_flexcan_interrupt_transfer and I want to receive all can id. I set rxIdentifier to 0x00, input 'B', send CAN message. The KW36 can receive my message, but then it receive  what it just send endlessly: 

The txIdentifier is 0x321. And I add this code:

flexcan_rx_fifo_config_t rxFifoConfig;
uint32_t rxFifoFilter[] = {
FLEXCAN_RX_FIFO_STD_FILTER_TYPE_A(txIdentifier, 0, 0),
FLEXCAN_RX_FIFO_STD_FILTER_TYPE_A(txIdentifier, 1, 0),
};

....

/* Setup Rx FIFO. */
rxFifoConfig.idFilterTable = rxFifoFilter;
rxFifoConfig.idFilterType = kFLEXCAN_RxFifoFilterTypeA;
rxFifoConfig.idFilterNum = sizeof(rxFifoFilter) / sizeof(rxFifoFilter[0]);
rxFifoConfig.priority = kFLEXCAN_RxFifoPrioHigh;

...

FLEXCAN_SetRxFifoConfig(EXAMPLE_CAN, &rxFifoConfig, true);

Then it works, but when I send more than 6 messages, it receive what it just send again. I really need your help!

Outcomes