Hello TI Team,
I'm using TCAN4550 for my project Now I can send and receive CAN message successfully at low rates , but I found my configured SID Filter may lost under certain circumstances .It made me unable to receive the message I want.
My configuration as follows,
TCAN4x5x_MRAM_Config MRAMConfiguration = {0};
MRAMConfiguration.SIDNumElements = 1; // Standard ID number of elements, you MUST have a filter written to MRAM for each element defined
MRAMConfiguration.XIDNumElements = 0; // Extended ID number of elements, you MUST have a filter written to MRAM for each element defined
MRAMConfiguration.Rx0NumElements = 8; //RX FIFO 0 number of elements: The number of elements for the RX FIFO 0
MRAMConfiguration.Rx0ElementSize = MRAM_64_Byte_Data; // RX0 data payload size
MRAMConfiguration.Rx1NumElements = 0; // RRX FIFO 1 number of elements: The number of elements for the RX FIFO 1
MRAMConfiguration.Rx1ElementSize = MRAM_64_Byte_Data; // RX1 data payload size
MRAMConfiguration.RxBufNumElements = 8; // RX buffer number of elements
MRAMConfiguration.RxBufElementSize = MRAM_64_Byte_Data; // RX buffer data payload size
MRAMConfiguration.TxEventFIFONumElements = 0; // TX Event FIFO number of elements
MRAMConfiguration.TxBufferNumElements = 32; // TX buffer number of elements
MRAMConfiguration.TxBufferElementSize = MRAM_64_Byte_Data; // TX buffer data payload size
......
TCAN4x5x_MCAN_SID_Filter SID_ID = {0};
SID_ID.Bits.SFT = TCAN4x5x_SID_SFT_RANGE; // SFT: Standard filter type. Configured as a classic filter
SID_ID.Bits.SFEC = TCAN4x5x_SID_SFEC_PRIORITYSTORERX0; // Standard filter element configuration, store it in RX fifo 0 as a priority message
SID_ID.Bits.SFID1 = 0x7BA; // SFID1 (Classic mode Filter)
SID_ID.Bits.SFID2 = 0x7FF; // SFID2
TCAN4x5x_MCAN_WriteSIDFilter(0, &SID_ID); // Write to the MRAM
In the method TCAN4x5x_MCAN_WriteSIDFilter, the readData is 800720895 after first call ,I can receive the message from '7BA' successfully at this time. But after I send a lot of message in a short time ,I can no longer receive the message from '7BA' and the readData of same address comes to 0.
The code of the sending method is as follows:
for(i=0;i<32;i++){
TCAN4x5x_MCAN_WriteTXBuffer(i, &header, data);
TCAN4x5x_MCAN_TransmitBufferContents(i);}
Can you please give me some suggestions that how can I deal with it, and what maybe the reason this happens?
Best regards,
Feng