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: How to TEST tcan4550 evm board using linux driver

Part Number: TCAN4550

Hi ,

      We are using TCAN4550 interfaced with SPI through the Linux.

We have ported dmurphy-analog  tcan4550 linux drvier for can 

/home/raghu/CAN/dmurphy-analog/drivers/net/can/spi/tcan4x5x.c .

How can we test it ?

Can we connect two tcan4550 each other  can test  it .

connecting CANH CANL  of two device one to one and GND's .

steps used:

on both linux terminal .

ip link set can0 down

ip link set can0  set bitrate 500000

ip link set can0 up 

from device A:

cansend  can0  123#45 

is sent .  and other side of device B  nothing is recevied .

Note: I tried few other cansend provided in example , candump shows nothing 

config show  frames dropped :1  .. carrier: 1

Is my setup is correct ?  

Can you please explain how to test it by connecting two TCAN4550 each other ?

Is there anything i need to change in software or hardware to make it work ?

Regards

Raghu DP 

  • Hello Raghu,

    This is not a linux support forum, but I can help you with getting the hardware setup properly.  Can you send me a diagram or schematic to review?  Are you using TCAN4550 EVMs to connect to some Processor development boards running your Linux OS? 

    Generally speaking you will need to connect the Digital IO pins of the TCAN4550 to the processor.  You will need the SPI signals (SDI, SDO, nCS, and SCLK) so that you can interface with the TCAN4550's register map and send and receive message data through the CAN bus.

    You will also generally need some form of interrupt from the TCAN4550 to the processor so that you know when new messages have arrived and any faults have occurred.  The nINT pin is the dedicated global interrupt pin, but the GPIO1 and GPO2 pins can also be used as additional interrupt pins.

    If you are using separate boards for the processor and the TCAN4550, you will need to make sure the grounds of the two boards are connected, and that the TCAN4550 VIO voltage matches the signal level of the processor (either 3.3V or 5V) so that the digital signals of the TCAN4550 are set to the appropriate levels.

    If the TCAN4550 and processor are connected properly, you should be able to read/write to the TCAN4550's registers through the SPI interface.

    To check CAN functionality, you will then need to connect the CANH and CANL signals between the two TCAN4550 boards or devices.  This is usually done with a twisted pair wire that has 120 ohm impedance.  However you can use jumper wires for short distances on a simple two board setup as long as the wires are of matched length and relatively short.

    You will also need to have 120 ohm termination resistance at each board or at the ends of a wiring harness if using a larger CAN bus per the CAN standard.  Without termination resistance, the CAN communication will fail.  The TCAN550 EVMs have termination resistance that can be enabled with jumpers.

    Regards,

    Jonathan