Jetson ORIN CAN controller test

Hi.
I’m trying to use CAN bus.
I have attached 2 CAN transceivers

and enabled can0 and can1 with following command.

#check current values of related registers
sudo busybox devmem 0x0c303000
sudo busybox devmem 0x0c303008
sudo busybox devmem 0x0c303010
sudo busybox devmem 0x0c303018
#0x0000C055
#0x0000C055
#0x0000C059
#0x0000C059

#use devmem to modify registers
sudo busybox devmem 0x0c303000 32 0x0000C400
sudo busybox devmem 0x0c303008 32 0x0000C458
sudo busybox devmem 0x0c303010 32 0x0000C400
sudo busybox devmem 0x0c303018 32 0x0000C458

#check modified values of relate registers
sudo busybox devmem 0x0c303000
sudo busybox devmem 0x0c303008
sudo busybox devmem 0x0c303010
sudo busybox devmem 0x0c303018
#0x0000C400
#0x0000C458
#0x0000C400
#0x0000C458

#or use modeprobe to mount CAN controller
sudo modprobe can
sudo modprobe can-raw
sudo modprobe can-dev
sudo modprobe mttcan

#configure CAN controllers with 1Mbps baudrate
sudo ip link set can0 type can bitrate 1000000
sudo ip link set can1 type can bitrate 1000000

#loopback test
sudo ip link set can0 type can bitrate 1000000 loopback on
sudo ip link set can1 type can bitrate 1000000 loopback on

#open CAN controller
sudo ip link set up can0
sudo ip link set up can1

the loopback mode works without problem

after i Test two CAN controllers by connecting CANH to CANH and CANL to CANL of the two controllers

and i change the command with

sudo ip link set can0 type can bitrate 1000000
sudo ip link set can1 type can bitrate 1000000

and for testing i do :

  • Open two treminals A and B,run this command in treminal A:

candump can0

  • Now the command executed in terminal A should under a listener mode and user inputs are not accepted.Now execute the following command in terminal B and watch what will happen in terminal A.

cansend can1 5A1#1122334455667788

  • It supposed to be successful if returned values are these:

can0 5A1 [8] 11 22 33 44 55 66 77 88

But, I am not receiving any messages.
I have already checked all the connections several times, that’s not the problem.

Can you help me please

Hi niels.tastayre,

Are you using the devkit or custom board for AGX Orin?
What’s your Jetpack version in use?

Do you connect CAN0 and CAN1 and 2 can transceiver as following instruction (including 3.3V and GND)?
Controller Area Network (CAN) — Enabling CAN

Could you help to use the following command for both can0 and can1 instead?

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

I use the devkit with Ubuntu 20.04.6 LTS and nvidia-jetpack
Version: 5.1-b147

I connected CAN0 and CAN1 exactly as the instructions say (with 3.3v and gnd)

I also used the command :
$ ip link set can0 up type can bitrate 500000 dbitrate 1000000 berr-reporting on fd on
$ ip link set can1 up type can bitrate 500000 dbitrate 1000000 berr-reporting on fd on

and the result is the same as before

Could you help to verify with latest Jetpack5.1.1 (R35.3.1)?

Do you have can transceiver other than current one using?
like the one suggested from the ducument.