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: tcan4x5x spi0.0 can2: msg lost in rxf0

Part Number: TCAN4550
Other Parts Discussed in Thread: AM5728,

Hi,

We are using TCAN4550 CAN interface in our AM5728 platform.

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

Then we use the "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.

Please suggest to resolve this issue.

Regards,
han

  • Han,

    I sent an email, but just to understand, are you using any interrupts to read the messages out of the memory space, or are you polling? And is the device in overwrite mode so that messages get overwritten?

    Regards,

    Eric Hackett 

  • hi Eric,

    Thank you for your support.

    I'm using candump tool to receive canfd data, when we receive canfd data 1ms frequency, after about 3 hours ,
    we got the "tcan4x5x spi0.0 can2: msg lost in rxf0" error.

    I'm not sure the mode is, here is my dts config.

    &mcspi3 {
    pinctrl-names = "default";
    pinctrl-0 = <&spi3_pins>;
    ti,pindir-d0-out-d1-in;
    status = "okay";
    #address-cells = <1>;
    #size-cells = <0>;
    tcan4450: tcan4x5x@1 {
    compatible = "ti,tcan4x5x";
    reset-gpios = <&gpio6 31 GPIO_ACTIVE_HIGH>;
    spi_int-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>;
    reg = <0>;
    spi-max-frequency = <16000000>;
    bosch,mram-cfg = <0x0 64 64 64 64 64 32 32>;
    };
    };

  • Hi Hanc,

    I'm reviewing your response and will get back to you with more info tomorrow. 

    Regards,
    Eric Schott

  • Hi Hanc,

    It sounds like you are able to operate the system with TCAN4550 for a while without issue. Only after some time operating this error is presented. If this is the case, I don't think there is an inherent issue with the device configuration. If so, it would have to do with some other part of the system, perhaps being dependant on the data received, that causes a problematic feature or memory address to be accessed. During this test, is there a variety of data and handling events going on? Is it possible that a unique event only occurs after this extended period that could call on a certain function or feature from TCAN4550? An example might be if a filter was configured to receive a certain ID for an event that only occurs after the system has been running for an extended period. Or perhaps an infrequent event that fills a FIFO or buffer which is not cleared before it overflows. 

    I'm not as familiar with our linux library for this device, but it looks like the configuration of the MRAM is quite large; 64 extended ID filters, two RX FIFOs with lengths of 64. Are you sure all of these filter elements are populated? Are the FIFO elements cleared after being read by the MCU? How often are elements being stored in the TXD/RXD FIFOs? 

    This RXF0 memory loss error sounds like an interrupt from the MCAN interrupt register (16'h1050). Is it possible to read the state of this register to see if there's any more flags set that could help identify exactly what caused the problem? The contents of the device interrupt register (16'h0820) would also be good to know. Lastly, the current mode of the device and some other configurations can be read from the mode control register (16'h0800). Please share the contents of these registers after the error is encountered.

    Let me know if you have any other questions in the meantime. 

    Regards,
    Eric Schott