This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TCAN4550: msg lost in rxf0

Part Number: TCAN4550

Hi,

We are using TCAN4550 CAN interface in our IMX6ULL platform.

Initially when we tried to recieve the data in 1sec frequency, we got the "tcan4x5x spi0.0 can2: msg lost in rxf0" error.

Then we changed the "bosch,mram-cfg = <0x0 3 2 1 6 3 10 7>;" to "bosch,mram-cfg = <0x0 64 64 64 64 64 32 32>;" in dts file, then we are able to receive the CAN data upto every 15ms.

Our requirement is to recevice the CAN data in every 1ms.

When we tried to receive the CAN data from CAR in 1ms, we are getting "tcan4x5x spi0.0 can2: msg lost in rxf0" .

Please suggest to resolve this issue.

Regards,
Haji

  • Haji,

    Thanks for bringing this to our attention, can I ask for which kind of application this is being used?

    Just for an explanation of the "Message Lost" interrupt: the "Message Lost in RX FIFO" can happen for a couple of reasons. The RX FIFO has a read and write pointer (get and put index). When the write pointer makes it back to the read pointer and a new message is received, if overwrite mode is not enabled, the TCAN4550-Q1 will assert a message lost error, because the FIFO is full, or at least according to the pointer it is full. You must adjust the read pointer in the RX FIFO by writing to the RXF0A (for FIFO 0), otherwise you will get message lost errors due to the FIFO being full. So this error is essentially thrown because the get and put indices looping back to each other because the get index is not being updated.

    When you say "receive the CAN data" what do you mean? Read the data out of the FIFO? Or actually receive a message stored to memory?

    In your initial MCAN config, you allotted for 3 11-bit filter elements, 2 29-bit filter elements, 1 RX FIFO 0 element, 6 RX FIFO 1 elements, 3 RX buffers, 10 TX event FIFO, and 7 TX buffers. Just to understand, were you able to receive data faster with this configuration, or did you only try 1 second frequency? 

    I want to make sure I understand the process in your application so we can get to the bottom of this.

    Regards,

  • Hello Eric,

    Thank you for your support.

    Please look at the below information and let me know your input.

    When we allotted for 3 11-bit filter elements, 2 29-bit filter elements, 1 RX FIFO 0 element, 6 RX FIFO 1 elements, 3 RX buffers, 10 TX event FIFO, and 7 TX buffers we were not able to read data at a frequency of 1 second. After this we changed it to "0x0 64 64 64 64 64 32 32" we are able to acheive 10ms read frequency.

    We have connected our device into CAN bus of the Car. Car ECU will be sending CAN packet for every 1ms(1000 packets per scond). At device side, we are running candump tool which uses Socket CAN to read data. So when we start the Car we recieve CAN packets for few milli second and then we are getting above msg lost print, as given below,

    :~# candump can2

    can2 18F1F05A [5] FF FF 00 BA 4F
    can2 08F10581 [8] 04 00 00 7D 00 7D 77 8A
    can2 08F10681 [8] 44 00 00 7D 00 7D 77 4A
    can2 18F1F813 [8] F5 00 FF FF 28 00 28 00
    can2 18F1D281 [8] 01 00 00 00 00 00 00 AA
    can2 08F10581 [8] 04 00 00 7D 00 7D 78 89
    can2 08F10681 [8] 44 00 00 7D 00 7D 78 49
    can2 08FE6E0B [8] 00 00 00 00 00 00 00 00
    can2 18F1F05A [5] FF FF 00 CA 16
    can2 18F1F813 [8] F5 00 FF FF 28 00 28 00
    can2 18F1F05A [5] FF FF 00 DA DB
    can2 08F10581 [8] 04 00 00 7D 00 7D 79 88
    can2 08F10681 [8] 44 00 00 7D 00 7D 79 48
    can2 18F1F813 [8] F5 00 FF FF 28 00 28 00
    can2 18F1F713 [8] 00 7D 30 75 30 75 30 75
    tcan4x5x spi0.0 can2: msg lost in rxf0
    can2 18F1F05A [5] FF FF 00 EA 91
    can2 08F10581 [8] 04 00 00 7D 00 7D 7A 87
    can2 08F10681 [8] 44 00 00 7D 00 7D 7A 47
    can2 08FE6E0B [8] 00 00 00 00 00 00 00 00
    can2 18F1F813 [8] F5 00 FF FF 28 00 28 00
    can2 18F1F05A [5] FF FF 00 FA 5C
    can2 08F10581 [8] 04 00 00 7D 00 7D 7B 86
    can2 08F10681 [8] 44 00 00 7D 00 7D 7B 46
    can2 18F1F813 [8] F5 00 FF FF 28 00 28 00
    can2 08F10681 [8] 13 F8 F1 58 00 00 08 FF
    tcan4x5x spi0.0 can2: msg lost in rxf0
    tcan4x5x spi0.0 can2: msg lost in rxf0
    tcan4x5x spi0.0 can2: msg lost in rxf0
    tcan4x5x spi0.0 can2: msg lost in rxf0
    tcan4x5x spi0.0 can2: msg lost in rxf0
    tcan4x5x spi0.0 can2: msg lost in rxf0

    Please let us know the mram configuration for the fastest communication.

    Also please let us know how to enable the burst mode/ bulk read.

    Regards,
    Haji

  • Haji,

    Since this is being handled through email, I'm closing this thread.

    Regards,

  • hello Eric,

      I have the same problem : "msg lost in rxf0".

      Would you like to share how to config the mram  for the fastest communication.My e-mail is hu1593572@qq.com.

      Looking forward to your reply.

    Regards,

    hu