CANbus doesnt recover after reset

I’m running my script on Nvidia Xavier
#!/bin/bash

sudo /sbin/ip link set can0 down
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 /sbin/ip link set can0 type can restart-ms 100
#sudo ifconfig can0 txqueuelen 1000
sudo ip link set can0 type can bitrate 1000000
sudo /sbin/ip link set can0 up

then, sending a simple message like this:
cansend can0 123#234567876543456

[this is how the message is sent since there is no ACK][1]

Then, to reset it I send:
sudo /sbin/ip link set can0 down
sudo /sbin/ip link set can0 up

and from now on nothing will work again until I hard reset the system…
any idea how to solve it?

hello taio,

please double check your hardware connections, please ensure you’re not loose the connections for transceiver.
besides, could you please gather kernel messages while the issue happened?
thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.