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: After 1 to 3 hours of normal use, data cannot be sent

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

Tool/software:

Hello!

Two TCAN4550-Q1 chips are attached to one SPI on our device, and communication is switched through chip selection. The problems are as follows:

Symptom:

1. When the device is used for 1 to 3 hours, CAN1 fails to send data to the CAN bus at random time, but CAN receive data on the CAN bus normally, and CAN2 sends and receives data normally; 

2. When CAN1 cannot send data, the kernel does not report any error, and CAN1 can be used normally after re-initialization;

3. multiple devices appear the same phenomenon;

4.CAN1 and CAN2 are two completely independent CAN buses connected to each other, and are not connected to one CAN bus;

The schematic diagram is as follows:

  • Hello wulu,

    1. When the device is used for 1 to 3 hours, CAN1 fails to send data to the CAN bus at random time, but CAN receive data on the CAN bus normally, and CAN2 sends and receives data normally; 

    Can you read the various Status, Interrupt, Control, and Error Counter registers?  (0x000C, 0x0800, 0x0820, 0x0824 or 0x1050, 0x1018, 0x1040, 0x1044)

    What is your TX Configuration?  Are you using a TX FIFO, Queue, or dedicated TX Buffers?  Can you monitor the TX FIFO/Queue Status and Pending registers? (0x10C4, 0x10CC)

    2. When CAN1 cannot send data, the kernel does not report any error, and CAN1 can be used normally after re-initialization;

    Does this include a device reset, or just re-writing the configuration registers?  Can you provide a list of the final register values you are using for the device configuration?

    Regards,

    Jonathan

  • Hi, Jonathan Nerger:
    Our device is running on Linux5.10 and using mcan driver, below is the devicetree about tcan4550.

    /* spi0 */
    &spi0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&spi0m1_pins &spi0m1_cs0 &spi0m1_cs1>;
    	num-cs = <2>;
    	max-freq = <18000000>;
    	tcan4x5x0: tcan4x5x@0{
    		compatible = "ti,tcan4x5x";
    		status = "okay";
    		reg = <0>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		spi-max-frequency = <18000000>;
    		pinctrl-0 = <&can0_int_rst>;
    		interrupt-parent = <&gpio2>;
    		interrupts = <RK_PC3 IRQ_TYPE_LEVEL_LOW>;
    		bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>;
    		reset-gpios = <&gpio2 RK_PB4 GPIO_ACTIVE_HIGH>;
    		spi-msb-first;
    	};
    	tcan4x5x1: tcan4x5x@1{
    		compatible = "ti,tcan4x5x";
    		status = "okay";
    		reg = <1>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		spi-max-frequency = <18000000>;
    		pinctrl-0 = <&can1_int_rst>;
    		interrupt-parent = <&gpio2>;
    		interrupts = <RK_PC5 IRQ_TYPE_LEVEL_LOW>;
    		bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>;
    		reset-gpios = <&gpio2 RK_PC4 GPIO_ACTIVE_HIGH>;
    		spi-msb-first;
    	};
    };
    
    &pinctrl {
    	spi-can { 
    		can0_int_rst: can0-int-rst {
    			rockchip,pins = <2 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>,
    							<2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down_drv_level_15>; 
    		};
    		can1_int_rst: can1-int-rst { 
    			rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>,
    							<2 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down_drv_level_15>; 
    		}; 
    	};
    };

  • Hi Hangxiang,

    The device that has stopped transmitting should have some interrupt, error counter, or status bits set that will provide information about why it has stopped transmitting.  You will need to monitor the registers I have previously mentioned so that we can determine the cause and solution to the issue you are observing.

    Regards,

    Jonathan