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-Q1: TCAN4550-Q1 Sending and receiving issue

Part Number: TCAN4550-Q1
Other Parts Discussed in Thread: TCAN4550, , TCAN4550EVM

TCAN4550 is used in customer's project.Customer's current software environment is the linux system.

Customer find TCAN4550's driver in Linux 5.8. They want to apply this drive in Linux4.14. There are several issue:

(1) The can interface simulated by the chip is used as the active sending interface, and the test program is run and other can interfaces are run for communication testing, and the following error log appears:

[2324.775233] tcan4x5x spi0.0 can2: Message RAM access failure occurred

[ 2324.799359] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY

send id: 0x10118cf6,success sizeof: 16[ 2325.758701] tcan4x5x spi0.0 can2: can_put_echo_skb: BUG! echo_skb is o!

 

[ 2325.771304] tcan4x5x spi0.0 can2: msg lost in rxf0

[ 2325.776120] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY

[ 2325.783622] tcan4x5x spi0.0 can2: Error Logging Overflow

[ 2325.788947] tcan4x5x spi0.0 can2: Bit Error Uncorrected

[ 2325.794184] tcan4x5x spi0.0 can2: Bit Error Corrected

[ 2325.799249] tcan4x5x spi0.0 can2: Timeout reached

[ 2325.803966] tcan4x5x spi0.0 can2: Message RAM access failure occurred

When sending, it is set to send one packet of data in 1 second. In the test, I saw that the interface is very unstable. Sometimes an error message appears after successfully sending a few packets of data, and sometimes an error message appears after sending dozens of packets, showing timeout and bit errors. After a period of time, the sending stops and exits, and there is no sending space when exiting the error display.

(2) The can interface simulated by the chip is used as the receiving interface, and the test program and other can interfaces are run for communication test, and the following error log appears:

[ 2227.070794] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY

[ 2227.122134] tcan4x5x spi0.0 can2: msg lost in rxf0

[ 2227.159848] tcan4x5x spi0.0 can2: Error Logging Overflow

[ 2227.165178] tcan4x5x spi0.0 can2: Bit Error Corrected

[ 2227.179778] tcan4x5x spi0.0 can2: msg lost in rxf0

[ 2227.861403] tcan4x5x spi0.0 can2: Error Logging Overflow

[ 2227.910141] tcan4x5x spi0.0 can2: Bit Error Uncorrected

[ 2227.915388] tcan4x5x spi0.0 can2: Bit Error Corrected

[ 2227.920461] tcan4x5x spi0.0 can2: Timeout reached

[ 2227.979157] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY

[ 2227.999612] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY

[ 2228.011034] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY

[ 2228.049773] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY

[ 2228.102673] tcan4x5x spi0.0 can2: msg lost in rxf0

[ 2228.107490] tcan4x5x spi0.0 can2: Error Logging Overflow

[ 2228.112811] tcan4x5x spi0.0 can2: Bit Error Uncorrected

[ 2228.118051] tcan4x5x spi0.0 can2: Message RAM access failure occurred

From the log information, you can see some bit errors and watchdog timeout issues, but although there are errors, the data packets sent afterwards can still be received (the content of the data may be wrong), after a period of time, the receiving end has nothing The message is printed (indicating that no data packet is received), and then the sending of the master terminal is also terminated. The error message is the same as before, and there is no room to send the message.

The complete information about sending and receiving can be found in the attachment, and we look forward to your reply.

/tcan-414 # ./can-test-receive -d 2 -b 125000
device_id = 2
baud = 125000
can dev : can2 
[ 2221.453411] IPv6: ADDRCONF(NETDEV_UP): can2: link is not ready
[ 2221.459296] IPv6: ADDRCONF(NETDEV_CHANGE): can2: link becomes ready
can_fd : 3
name : can2
CanInit success 
ID=0x2f6 DLC=0 sizeof: 16 
rec-0: 0xf6
rec-1: 0x2
rec-2: 0
rec-3: 0
rec-4: 0
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0
rec-9: 0
rec-10: 0
rec-11: 0
rec-12: 0
rec-13: 0
rec-14: 0
rec-15: 0

[ 2225.007296] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2225.012635] tcan4x5x spi0.0 can2: Bit Error Uncorrected
[ 2225.017873] tcan4x5x spi0.0 can2: Bit Error Corrected
[ 2225.022936] tcan4x5x spi0.0 can2: Timeout reached
[ 2225.162737] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2225.168073] tcan4x5x spi0.0 can2: Bit Error Uncorrected
[ 2225.221017] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2225.226348] tcan4x5x spi0.0 can2: Bit Error Uncorrected
[ 2225.240939] tcan4x5x spi0.0 can2: msg lost in rxf0
[ 2225.269519] tcan4x5x spi0.0 can2: Timeout reached
ID=0x3f6 DLC=6 sizeof: 16 0x4  0x5  0x6  0x7  0x8  0x9  
rec-0: 0xf6
rec-1: 0x3
rec-2: 0
rec-3: 0
rec-4: 0x6
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0x4
rec-9: 0x5
rec-10: 0x6
rec-11: 0x7
rec-12: 0x8
rec-13: 0x9
rec-14: 0x6
rec-15: 0x7

[ 2227.070794] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2227.122134] tcan4x5x spi0.0 can2: msg lost in rxf0
[ 2227.159848] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2227.165178] tcan4x5x spi0.0 can2: Bit Error Corrected
[ 2227.179778] tcan4x5x spi0.0 can2: msg lost in rxf0
[ 2227.861403] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2227.910141] tcan4x5x spi0.0 can2: Bit Error Uncorrected
[ 2227.915388] tcan4x5x spi0.0 can2: Bit Error Corrected
[ 2227.920461] tcan4x5x spi0.0 can2: Timeout reached
[ 2227.979157] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2227.999612] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2228.011034] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2228.049773] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2228.102673] tcan4x5x spi0.0 can2: msg lost in rxf0
[ 2228.107490] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2228.112811] tcan4x5x spi0.0 can2: Bit Error Uncorrected
[ 2228.118051] tcan4x5x spi0.0 can2: Message RAM access failure occurred
ID=0 DLC=6 sizeof: 16 0  0  0  0x8  0xa  0xb  [ 2229.831440] tcan4x5x spi0.0 can2: Timeout reached

rec-0: 0
rec-1: 0
rec-2: 0
rec-3: 0
rec-4: 0x6
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0
rec-9: 0
rec-10: 0
rec-11: 0x8
rec-12: 0xa
rec-13: 0xb
rec-14: 0x8
rec-15: 0x9

ID=0x400 DLC=0 sizeof: 16 
rec-0: 0
rec-1: 0x4
rec-2: 0
rec-3: 0
rec-4: 0
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0
rec-9: 0
rec-10: 0
rec-11: 0
rec-12: 0
rec-13: 0
rec-14: 0
rec-15: 0

[ 2230.939594] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
ID=0x5f6 DLC=6 sizeof: 16 0x6  0x7  0x8  0x9  0xa  0xb  
rec-0: 0xf6
rec-1: 0x5
rec-2: 0
rec-3: 0
rec-4: 0x6
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0x6
rec-9: 0x7
rec-10: 0x8
rec-11: 0x9
rec-12: 0xa
rec-13: 0xb
rec-14: 0x8
rec-15: 0x9

ID=0x6f6 DLC=8 sizeof: 16 0  0  0x9  0xa  0  0  0x8  0xa  
rec-0: 0xf6
rec-1: 0x6
rec-2: 0
rec-3: 0
rec-4: 0x8
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0
rec-9: 0
rec-10: 0x9
rec-11: 0xa
rec-12: 0
rec-13: 0
rec-14: 0x8
rec-15: 0xa

[ 2231.861126] tcan4x5x spi0.0 can2: Timeout reached
[ 2231.865851] tcan4x5x spi0.0 can2: Message RAM access failure occurred
[ 2231.982440] tcan4x5x spi0.0 can2: Bit Error Corrected
[ 2232.031990] tcan4x5x spi0.0 can2: msg lost in rxf0
[ 2232.061498] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2232.102332] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2232.107661] tcan4x5x spi0.0 can2: Bit Error Uncorrected
[ 2232.202399] tcan4x5x spi0.0 can2: Message RAM access failure occurred
[ 2232.829931] tcan4x5x spi0.0 can2: bus-off
[ 2232.834148] tcan4x5x spi0.0 can2: msg lost in rxf0
[ 2232.838958] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2232.846455] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2232.851781] tcan4x5x spi0.0 can2: Bit Error Uncorrected
[ 2232.857019] tcan4x5x spi0.0 can2: Bit Error Corrected
[ 2232.862084] tcan4x5x spi0.0 can2: Timeout reached
[ 2232.866792] tcan4x5x spi0.0 can2: Message RAM access failure occurred
ID=0x6f6 DLC=6 sizeof: 16 0x7  0x8  0x9  0xa  0xb  0xc  
rec-0: 0xf6
rec-1: 0x6
rec-2: 0
rec-3: 0
rec-4: 0x6
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0x7
rec-9: 0x8
rec-10: 0x9
rec-11: 0xa
rec-12: 0xb
rec-13: 0xc
rec-14: 0x9
rec-15: 0xa

[ 2234.829815] tcan4x5x spi0.0 can2: Rx FIFO 0 Message Lost
[ 2234.837527] tcan4x5x spi0.0 can2: msg lost in rxf0
[ 2234.842346] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2234.849837] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2234.855162] tcan4x5x spi0.0 can2: Bit Error Uncorrected
[ 2234.860400] tcan4x5x spi0.0 can2: Bit Error Corrected
[ 2234.865465] tcan4x5x spi0.0 can2: Timeout reached
[ 2234.870182] tcan4x5x spi0.0 can2: Message RAM access failure occurred
ID=0 DLC=0 sizeof: 16 
rec-0: 0
rec-1: 0
rec-2: 0
rec-3: 0
rec-4: 0
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0
rec-9: 0
rec-10: 0
rec-11: 0
rec-12: 0
rec-13: 0
rec-14: 0
rec-15: 0

ID=0xf6 DLC=6 sizeof: 16 0x80  0xc  0xb  0xc  0x1a  0x1c  
rec-0: 0xf6
rec-1: 0
rec-2: 0
rec-3: 0
rec-4: 0x6
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0x80
rec-9: 0xc
rec-10: 0xb
rec-11: 0xc
rec-12: 0x1a
rec-13: 0x1c
rec-14: 0xe
rec-15: 0xc

[ 2236.040992] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2236.046329] tcan4x5x spi0.0 can2: Bit Error Uncorrected
[ 2236.051561] tcan4x5x spi0.0 can2: Bit Error Corrected
[ 2236.091826] tcan4x5x spi0.0 can2: Bit Error Uncorrected
[ 2236.097073] tcan4x5x spi0.0 can2: Bit Error Corrected
[ 2236.102131] tcan4x5x spi0.0 can2: Timeout reached
[ 2236.211279] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2236.221388] tcan4x5x spi0.0 can2: msg lost in rxf0
[ 2236.239519] tcan4x5x spi0.0 can2: Timeout reached
[ 2236.341351] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
ID=0x1f6 DLC=6 sizeof: 16 0xa  0xb  0xc  0xd  0xe  0xf  
rec-0: 0xf6
rec-1: 0x1
rec-2: 0
rec-3: 0
rec-4: 0x6
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0xa
rec-9: 0xb
rec-10: 0xc
rec-11: 0xd
rec-12: 0xe
rec-13: 0xf
rec-14: 0xc
rec-15: 0xd

ID=0 DLC=0 sizeof: 16 
rec-0: 0
rec-1: 0
rec-2: 0
rec-3: 0
rec-4: 0
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0
rec-9: 0
rec-10: 0
rec-11: 0
rec-12: 0
rec-13: 0
rec-14: 0
rec-15: 0

[ 2237.851900] tcan4x5x spi0.0 can2: Timeout reached
[ 2237.856624] tcan4x5x spi0.0 can2: Message RAM access failure occurred
[ 2237.901904] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2237.943132] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2238.002054] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2238.007388] tcan4x5x spi0.0 can2: Bit Error Corrected
[ 2238.030645] tcan4x5x spi0.0 can2: msg lost in rxf0
[ 2238.069717] tcan4x5x spi0.0 can2: Timeout reached
ID=0x3f6 DLC=6 sizeof: 16 0xc  0xd  0xe  0xf  0  0  
rec-0: 0xf6
rec-1: 0x3
rec-2: 0
rec-3: 0
rec-4: 0x6
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0xc
rec-9: 0xd
rec-10: 0xe
rec-11: 0xf
rec-12: 0
rec-13: 0
rec-14: 0
rec-15: 0x40

[ 2238.861218] tcan4x5x spi0.0 can2: Error Logging Overflow
ID=0x4f6 DLC=0 sizeof: 16 
rec-0: 0xf6
rec-1: 0x4
rec-2: 0
rec-3: 0
rec-4: 0
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0
rec-9: 0
rec-10: 0
rec-11: 0
rec-12: 0
rec-13: 0
rec-14: 0
rec-15: 0

[ 2239.013176] tcan4x5x spi0.0 can2: Timeout reached
[ 2239.017900] tcan4x5x spi0.0 can2: Message RAM access failure occurred
[ 2239.032746] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2239.038079] tcan4x5x spi0.0 can2: Bit Error Corrected
[ 2239.830829] tcan4x5x spi0.0 can2: Rx FIFO 0 Message Lost
ID=0 DLC=0 sizeof: 16 
rec-0: 0
rec-1: 0
rec-2: 0
rec-3: 0
rec-4: 0
rec-5: 0
rec-6: 0
rec-7: 0
rec-8: 0
rec-9: 0
rec-10: 0
rec-11: 0
rec-12: 0
rec-13: 0
rec-14: 0
rec-15: 0

[ 2240.900622] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2240.912972] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2241.023899] tcan4x5x spi0.0 can2: msg lost in rxf0
[ 2241.134001] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2241.320741] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2241.453226] tcan4x5x spi0.0 can2: msg lost in rxf0

/tcan-414 # ./can-test-sent -d 2 -b 125000 -s 3
device_id = 2
baud = 125000
start num = 3
can dev : can2 
[ 2323.744566] IPv6: ADDRCONF(NETDEV_UP): can2: link is not ready
[ 2323.750465] IPv6: ADDRCONF(NETDEV_CHANGE): can2: link becomes ready
can_fd : 3
name : can2
CanInit success 
send id: 0x10118af6,success siz[ 2323.760754] NOHZ: local_softirq_pending 08
eof: 16
send id: 0x10118bf6,success sizeof: 16
[ 2324.775233] tcan4x5x spi0.0 can2: Message RAM access failure occurred
[ 2324.799359] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
send id: 0x10118cf6,success sizeof: 16[ 2325.758701] tcan4x5x spi0.0 can2: can_put_echo_skb: BUG! echo_skb is o!

[ 2325.771304] tcan4x5x spi0.0 can2: msg lost in rxf0
[ 2325.776120] tcan4x5x spi0.0 can2: Message RAM Watchdog event due to missing READY
[ 2325.783622] tcan4x5x spi0.0 can2: Error Logging Overflow
[ 2325.788947] tcan4x5x spi0.0 can2: Bit Error Uncorrected
[ 2325.794184] tcan4x5x spi0.0 can2: Bit Error Corrected
[ 2325.799249] tcan4x5x spi0.0 can2: Timeout reached
[ 2325.803966] tcan4x5x spi0.0 can2: Message RAM access failure occurred
send id: 0x10118df6,success sizeof: 16
send id: 0x10118ef6,success sizeof: 16
send id: 0x10118ff6,success sizeof: 16
send id: 0x101190f6,success sizeof: 16
send id: 0x101191f6,success sizeof: 16
send id: 0x101192f6,success sizeof: 16
send id: 0x101193f6,success sizeof: 16
send id: 0x101194f6,success sizeof: 16
send id: 0x101195f6,success sizeof: 16
send id: 0x101196f6,success sizeof: 16
write frame: No buffer space available
Send Error frame[0]
/tcan-414 # 

Best Regards

Songzhen Guo

  • Songzhen,

    Thank you for bringing this to our attention, can I ask what kind of application the customer is using the TCAN4550-Q1? And has the customer looked over the TCAN4550-Q1 Software user's guide? If not, here is a link to it.

    From the log information of both the transmit and receive side, it looks like the MRAM isn't configured correctly, nor are the RX FIFOs. Is the customer zeroing out the entire MRAM space before configuration? And is it possible to share the customer's configuration of their RX and TX FIFO/buffers?

    Can you elaborate on the test environment? I see that you mentioned in the transmit case, a test program is run and other CAN interfaces are run for communication testing. Does this mean multiple CAN nodes on a bus with the TCAN4550-Q1 to initiate a test?

    Regards,

  • Hi Eric,

    Thank you so much for you help. Here is the update:

    1. The current project is about DMS(Driver monitoring system). Because of the main processor lack of CAN communication interface, it need a converter between CAN and SPI.

    2.For the TCAN4550-Q1 software user manual documentation, customer downloaded it and read it. The document has a sample code for MCU. But customer use Linux system to operate the chip. So the first task for customer is to implement the operation under Linux(Implement it themselves).

    3.When customer ported the driver for TCAN4550-Q1 in Linux, they search the driver code, because the kernel version they were using was the 4.14, it did not support the driver of TCAN4550-Q1. At last, they found Linux 5.8 kernel code support TCAN4550-Q1. the code URL show as follow: https://elixir.bootlin.com/linux/latest/source/drivers/net/can/m_can

    Then customer port the file shown in the 4.14 version of the kernel, For the device modifications, customer refer to the information on this link:https://e2e.ti.com/support/interface/f/138/p/855657/3166742

    Customer's main platform is IMX8, Therefore,  this device in this section is also written with reference to the following website:https://community.nxp.com/t5/i-MX-Processors/IMX6ULL-TCAN4550-Bringup-issue/m-p/1012753

    The final device tree information is as follows:

    &ecspi1 {

                       fsl,spi-num-chipselects = <1>;

     

                       pinctrl-names = "default";

     

                       pinctrl-0 = <&pinctrl_ecspi1_1>;

     

                       cs-gpios = <&gpio4 26 0>;

     

                       status = "okay";

    tcan4x5x: tcan4x5x@0 {

                       compatible = "ti,tcan4x5x";

                       reg = <0>;

                       #address-cells = <1>;

                       #size-cells = <1>;

                       spi-max-frequency = <5000000>;

                       bosch,mram-cfg = <0x0 0 0 32 0 0 1 1>;

                       interrupt-parent = <&gpio1>;

                       interrupts = <23 GPIO_ACTIVE_LOW>;

                       reset-gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;

      };

    };

     You're talking about MRAM is not configured. From the configure tree, the MRAN configuration is highlighted. Could you check the configuration?

    4. Currently, customer is using TCAN4550EVM and IMX8 EVM. There are SPI bus and CAN bus between those two device. The test environment is like that:

    Customer run two task on the imx8 EVM, one is task sending, another is task receiving, it's a loop for the data. There are two CAN nodes, one is on IMX8, another is on TCAN4550-Q1 EVM.

    Could you give us some suggestion? This case is urgent for customer. If you want to know anything else, please be free to contact me. Thanks.

     

    Best Regards

    Sognzhen

     

  • Songzhen,

    Sorry for the lack of response on this. 

    The configuration the customer is using is for 32 RX FIFO 0 elements, 1 TX event FIFO and 1 TX buffer, is this the intention? And what is the element size configured? From the error messages the customer is receiving, it looks like either new messages are being blocked because the FIFO is full and not being read out, or the size of the elements isn't allocated correctly for the message size.

    Also, the bit error uncorrected is a result of not clearing out the memory prior to CAN transmission. It's possible that there is leftover data in the memory space that is blocking messages from being received. Can the customer write all 0s to the RX FIFO to clear out any old data that may be there and taking up the element?

    Regards,