Jetson Orin AGX CAN BUS problem

I’m try to connect 2 new Jetson to to different microcontrollers to send and receive information.

I have 18 Jetson Orin AGX Development kit, only in the last 2 new Jetsons the can bus fails, I followed the official developer guide for all of them, and this is the configuration:

# Load kernel modules
modprobe can
modprobe can_raw
modprobe mttcan

# Setup pinmux configurations
busybox devmem 0x0c303000 32 0x0000C400
busybox devmem 0x0c303008 32 0x0000C458
busybox devmem 0x0c303010 32 0x0000C400
busybox devmem 0x0c303018 32 0x0000C458

# Setup CAN network
ip link set can0 up type can bitrate 1000000
ip link set can1 up type can bitrate 1000000

Send a package from same Jetson

# Send msg to can0
cansend can0 123#1122334455667788

dmesg output:

[  907.462205] can: controller area network core
[  907.462262] NET: Registered protocol family 29
[  907.467003] can: raw protocol
[  907.472214] CAN device driver interface
[  907.478114] 	 Message RAM Configuration
               	| base addr   |0x0c312000|
               	| sidfc_flssa |0x00000000|
               	| xidfc_flesa |0x00000040|
               	| rxf0c_f0sa  |0x000000c0|
               	| rxf1c_f1sa  |0x000009c0|
               	| rxbc_rbsa   |0x000009c0|
               	| txefc_efsa  |0x000009c0|
               	| txbc_tbsa   |0x00000a40|
               	| tmc_tmsa    |0x00000ec0|
               	| mram size   |0x00001000|
[  907.479455] Release 3.2.3 from 09.06.2018
[  907.481318] net can0: mttcan device registered (regs=000000008bc8e899, irq=115)
[  907.484196] 	 Message RAM Configuration
               	| base addr   |0x0c322000|
               	| sidfc_flssa |0x00000000|
               	| xidfc_flesa |0x00000040|
               	| rxf0c_f0sa  |0x000000c0|
               	| rxf1c_f1sa  |0x000009c0|
               	| rxbc_rbsa   |0x000009c0|
               	| txefc_efsa  |0x000009c0|
               	| txbc_tbsa   |0x00000a40|
               	| tmc_tmsa    |0x00000ec0|
               	| mram size   |0x00001000|
[  907.485564] Release 3.2.3 from 09.06.2018
[  907.485904] net can1: mttcan device registered (regs=00000000c624d511, irq=116)
[  907.528721] mttcan c310000.mttcan can0: Bitrate set
[  907.528815] mttcan_controller_config: ctrlmode 0
[  907.528828] mttcan c310000.mttcan can0: Bitrate set
[  907.528935] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
[  907.530747] mttcan c320000.mttcan can1: Bitrate set
[  907.530806] mttcan_controller_config: ctrlmode 0
[  907.530819] mttcan c320000.mttcan can1: Bitrate set
[  908.549305] IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
[  911.631219] NVRM rpcRmApiControl_dce: NVRM_RPC_DCE: Failed RM ctrl call cmd:0x731341 result 0xffff:
[  912.122263] NVRM rpcRmApiControl_dce: NVRM_RPC_DCE: Failed RM ctrl call cmd:0x731341 result 0xffff:
[  917.660140] NVRM rpcRmApiControl_dce: NVRM_RPC_DCE: Failed RM ctrl call cmd:0x731341 result 0xffff:
[  918.150348] NVRM rpcRmApiControl_dce: NVRM_RPC_DCE: Failed RM ctrl call cmd:0x731341 result 0xffff:
[  925.491485] NVRM rpcRmApiControl_dce: NVRM_RPC_DCE: Failed RM ctrl call cmd:0x731341 result 0xffff:
[  925.983564] NVRM rpcRmApiControl_dce: NVRM_RPC_DCE: Failed RM ctrl call cmd:0x731341 result 0xffff:
[  927.369911] mttcan c310000.mttcan can0: entered error warning state
[  927.376409] mttcan c310000.mttcan can0: entered error passive state
[  927.382938] mttcan c310000.mttcan can0: entered bus off state

the other jetsons do not show this error in dmesg when i try to send a package to can0 (c310000) or can1 (c320000):

# When execute: cansend can0 123#1122334455667788
[  927.369911] mttcan c310000.mttcan can0: entered error warning state
[  927.376409] mttcan c310000.mttcan can0: entered error passive state
[  927.382938] mttcan c310000.mttcan can0: entered bus off state
# When execute: cansend can1 123#1122334455667788
[  927.369911] mttcan c320000.mttcan can1: entered error warning state
[  927.376409] mttcan c320000.mttcan can1: entered error passive state
[  927.382938] mttcan c320000.mttcan can1: entered bus off state

here the jetson is not connected to anything else and candump does not show the arrival of the package that it sends itself, apparently the network stops working

candump -x any

Also try to configure the CAN bus pins following this guide:

sudo /opt/nvidia/jetson-io/config-by-function.py -o dtb can0 can1
# Configuration saved to /boot/kernel_tegra234-p3701-0000-p3737-0000-user-custom.dtb.
# Reboot system to reconfigure.
sudo reboot

but it fails anyway, although this script does not write the same configuration for the pinmux

busybox devmem 0x0c303000 
# 0x0000C404
busybox devmem 0x0c303008 
# 0x0000C454
busybox devmem 0x0c303010
# 0x0000C404
busybox devmem 0x0c303018
# 0x0000C454

the way to solve it has been to add the loopback, with this it is now possible to send the messages without the mttcan driver dying:

# Setup CAN network
ip link set can0 up type can bitrate 1000000 loopback on
ip link set can1 up type can bitrate 1000000 loopback on

Something else that I am not sure about is the bitrate, I have tried 1M the first time and 5M by mistake and in both cases it has worked and I receive the packets that I sent to the CAN bus through an external microcontroller.

All Jetson that have the can bus working have the same configuration:

  • Kernel: Linux ubuntu 5.10.104-tegra
  • Jetpack: 5.1.1-b56

The last two for which the CAN bus does not work also have the same configuration:

  • Kernel: Linux ubuntu 5.10.104-tegra
  • Jetpack: 5.1.1-b56

Update:

using loopback doesn’t really work, it just makes the mttcan driver not fail when checked in dmesg, when connecting an external CAN adapter it is not possible to read or write to the bus.

Update 2:

Installing nvidia-jetpack 5.1.1b56 again on a Jetson that previously had the can bus working and configuring the can bus again in the same way as it was done the first time has stopped working.

updating to nvidia-jetpack 5.1.2-b104 on the same previously jetson that previously had the can bus working with 5.1.1b56 has now stopped working and the same error message appears with the mttcan.

Let me clarify, this Jetson is DIFFERENT from the two new ones in the thread and it was working until before updating the firmware

dmesg:

The only difference that occurs to me is that when downloading the files with the same version (5.1.1b56) something may be different from the last time it was installed on the other jetsons.

Update 3:

In one of the jetsons one of the CANs has finally worked, only CAN0, but it is quite strange that it works but it is running dmesg is printing this message:

CAN1 still doesn’t work and we don’t understand why.

Hi yeison,

Do you mean only 2 AGX Orin devkits hit the issue and the others work as expected?

loopback on means the internal loopback test for specific interface and you don’t need any external connections.

Could you share the block diagram of your connection?
Do you want to transmit packet from one AGX Orin devkit to another AGX Orin devkit?
Have you used CAN transceiver in your setup? If so, which transceiver are you using?

You could also refer to the following verification to transmit CAN packet from can0 to can1.
Loopback test for 2 CAN interfaces

Hi Kevin, yes, only 2 AGX Orin devkits hit the issue and the others work as expected.

As I mentioned before, the loopback option didn’t really do anything, at first we thought it did but after testing we realized that it wasn’t receiving or sending information over the bus.

This is the current configuration we are testing with, we changed the pins from can0 to can1 but the diagram is the same, we have also tried testing without anything connected to the jetson, not even the transceiver.

This is the transceiver SN65HVD230D

If so, I would suspect if there’s any difference for these 2 devkits board.
Could you help to compare the dmesg in these 2 devkits with others?

Have you referred to the link I shared to perform loopback test on AGX Orin devkit?

Is this still an issue to support? Any result can be shared?