Some suggestions on troubleshooting CAN interface

Everytime you wanna start using the CAN on Jetson, do configure it everytime with something like

sudo ip link set down can1
sudo ip link set down can0
sudo busybox devmem 0x0c303000
sudo busybox devmem 0x0c303010
sudo busybox devmem 0x0c303008
sudo busybox devmem 0x0c303000 32 0x0000C400

sudo busybox devmem 0x0c303008 32 0x0000C458

sudo busybox devmem 0x0c303010 32 0x0000C400

sudo busybox devmem 0x0c303018 32 0x0000C458

sudo modprobe can

sudo modprobe can_raw
sudo modprobe mttcan

sudo ip link set can0 up type can bitrate 250000 sjw 127 dbitrate 2000000 dsjw 15 berr-reporting on fd on
sudo ip link set can1 up type can bitrate 250000 sjw 127 dbitrate 2000000 dsjw 15 berr-reporting on fd on
sudo ip link set up can0
sudo ip link set up can1
ip -s -d link show can0
ip -s -d link show can1

The magic here is:sudo ip link set can0 up type can bitrate 250000 sjw 127 dbitrate 2000000 dsjw 15 berr-reporting on fd on… this was what saved me from ever-lasting troubles. Do read on it.

1 Like