What is the order of communication for CAN communication?

Hi there is someone who is currently studying tx2

Linux is a beginner and it is very difficult.

I am trying to communicate with CAN.

There are currently CAN-related things such as MODPROBE CAN, MTTCOAN, CAN-RAW etc.

If IFCONFIG -A is used, I do not know what to do next. I installed can-utils.

I want to communicate by connecting to the TX2 pin with KVASER connected to PC.

I need a board like a transceiver.

I made a TX RX GND VCC connection using the company’s board and IC.

CANSAND does not respond to CANDUMP.

We would be grateful if you could give me some details on the procedure or method of CAN communication.

The kernel build follows https://www.youtube.com/watch?v=fxWObd1nK4s this video.

This is too stressful for this. I would also appreciate if you let me know what you need to set up.

Please let me know your details.

And I wonder if it is possible to test the communication inside the tx2 itself.

CAN0 TX-----RX CAN1
RX-----TX

1 Like

Hi,

Jetson TX2 has the support of 2 CAN controllers.

To make use of CAN communications, CAN transceiver has to be interfaced with each of the controllers.
CAN transceiver is the interface between a controller area network (CAN) protocol controller and the physical bus.
To interface transceiver with CAN controller please follow TX2 TRM (CAN topic).
For a quick setup please check the pin descriptions and the attachment.

With our local setup, Transceiver - TI SN65HVD230 is being used.

Also, detailed setup steps are mentioned at
https://devtalk.nvidia.com/default/topic/1025010/jetson-tx2/how-to-use-can-on-jetson-tx2-/post/5213792/#5213792

Please let us know if you still face the problem with CAN network setup.
For your reference, you can look at our setup in the attachment.

Thanks & Regards,
Sandipan
JetsonTX2_CAN.png

HI!! THANKS spatra~~
I have a few questions.

PC—KVASER—D-SUB–120ohm–D-SUB —
2— CANH
7— CANL

is this right?

   TRANSCEIVER                TX2                             
   VCC 5V ---------------   8 PIN 5V
   VCC 3.3 --------------   2 PIN 3.3V    
   TX     ---------------   7 PIN TX
   RX     ---------------   5 PIN RX
   GND    ---------------   10 PIN GND

1.Where canh, canl connect?

2.Do I need two transceivers to communicate 1 channel?

3.TX2 CAN0, CAN1 Do I need two transceivers to communicate internally?

Hi,

To reply your points:

Where canh, canl connect?

[Ans] You will need 2 transceivers for a Jetson TX2 board. One Transceiver for each of the CAN controllers.
canH on transceiver-1 to be connected directly with canH on transceiver-2
canL on transceiver-1 to be connected directly with canL on transceiver-2

TX2 CAN0, CAN1 Do I need two transceivers to communicate internally??

[Ans] Yes. To form CAN node, Transceiver is needed on TX2.
TX2 has pre-support for CAN controllers but to present the controllers as CAN nodes in the network, you need to interface each controller with a transceiver.
Hence both the CAN controllers in TX2 will need to have separate transceivers.

Also, please check the previous attachment to have a good understanding on interfacing of transceivers.

Hope this answers your queries. If you still have any problem with can communication please revert back.

Thanks & Regards,
Sandipan

can0: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state BUS-OFF (berr-counter tx 248 rx 0) restart-ms 0
bitrate 5000000 sample-point 0.750
tq 25 prop-seg 2 phase-seg1 3 phase-seg2 2 sjw 1
mttcan: tseg1 2…255 tseg2 0…127 sjw 1…127 brp 1…511 brp-inc 1
mttcan: dtseg1 1…31 dtseg2 0…15 dsjw 1…15 dbrp 1…15 dbrp-inc 1
clock 40000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 1 0
RX: bytes packets errors dropped overrun mcast
24 3 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0

can1: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state BUS-OFF (berr-counter tx 248 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 25 prop-seg 34 phase-seg1 35 phase-seg2 10 sjw 1
mttcan: tseg1 2…255 tseg2 0…127 sjw 1…127 brp 1…511 brp-inc 1
mttcan: dtseg1 1…31 dtseg2 0…15 dsjw 1…15 dbrp 1…15 dbrp-inc 1
clock 40000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 1 0
RX: bytes packets errors dropped overrun mcast
24 3 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0

please explain what the current state is. I do not know.

cansend can0 123#abcdabcd
candump can1>>>>>> nothing appears!!!

can0>>>>>can1 I do not know how to communicate.

can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:171

can1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:172

Module Size Used by
can_bcm 15298 0
can_gw 10262 0
can_raw 9004 0
can 46782 3 can_gw,can_bcm,can_raw
mttcan 60323 0
can_dev 13416 1 mttcan
vfat 10579 1
fat 63477 1 vfat
fuse 89760 2
bcmdhd 7633912 0
pci_tegra 75137 0
bluedroid_pm 13564 0

It is currently my state. help me!!!

Hi,

Can you please check if the below steps to set ip link (with suitable arguments) are properly done ?

ip link set can0 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on
ip link set up can0
ip link set can1 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on
ip link set up can1

Hi ruruiae13,

Have you clarified the cause and resolved it?
Any result can be shared?

Thanks

We have created a new transceiver. The solder and the wiring were cleaned again and communication was made.

We have created a new transceiver. The solder and the wiring were cleaned again and communication was made.