: CAN0 on Orin Nano Immediately Goes BUS-OFF on Transmission Attempt (Physical Layer Issue? TX Error Counter Hits 248, RX at 0)

Orin Nano, using CAN communication, cannot achieve external communication. Here are my operation commands: jetpack6.2, r36.4.4
sudo busybox devmem 0x0c303018 w 0xc458
sudo busybox devmem 0x0c303010 w 0xc400
sudo modprobe can
sudo modprobe can_raw
sudo modprobe mttcan
sudo ip link set can0 type can bitrate 500000
sudo ip link set can0 up

Below is the log after the operation

root@test-desktop:/home/test# dmesg | grep can0
[ 10.971223] net can0: mttcan device registered (regs=00000000142f50e1, irq=200)
[ 46.301327] mttcan c310000.mttcan can0: Bitrate set
[ 46.316502] mttcan c310000.mttcan can0: Bitrate set
[ 46.316572] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready

Run cansend can0 123#abcdef

Upon re-examination, it was found that the CAN bus was closed
root@test-desktop:/home/test# dmesg | grep can0
[ 10.971223] net can0: mttcan device registered (regs=00000000142f50e1, irq=200)
[ 46.301327] mttcan c310000.mttcan can0: Bitrate set
[ 46.316502] mttcan c310000.mttcan can0: Bitrate set
[ 46.316572] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
[ 93.776634] mttcan c310000.mttcan can0: entered error warning state
[ 93.776648] mttcan c310000.mttcan can0: entered error passive state
[ 93.777455] mttcan c310000.mttcan can0: entered bus off state

root@test-desktop:/home/test# ip -s -d link show can0
2: can0: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 10
link/can promiscuity 0 minmtu 0 maxmtu 0
can state BUS-OFF (berr-counter tx 248 rx 0) restart-ms 0
bitrate 500000 sample-point 0.870
tq 20 prop-seg 43 phase-seg1 43 phase-seg2 13 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 50000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 1 1 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 parentbus platform parentdev c310000.mttcan
RX: bytes packets errors dropped missed mcast
24 3 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0

Hi Yang_Banxian,

Could you share how do you connect the external CAN device on CAN0?
Do you have CAN transceiver in your case?

The bus-off issue of CAN may be caused from the wrong connection.

The external CAN is a USB-to-CAN device with a built-in transceiver, where CANH is connected to the H pin of Jetson and CANL is connected to the L pin of Jetson,
We have designed our own transceiver on the Jetson board, and the transceiver model is CA-IS3062W, as shown in the attachment



There’s no built-in CAN transceiver on Orin Nano.
Okay, you have CA-IS3062W as CAN transceiver connected on your custom board.

Please also check if you have 120Ohm terminal resistor in your design. It is required for CAN transaction.