When CANH and CANL were short connected, XAVIER’s CAN controller stopped working,it is the bus-off state,How to make CAN work again.I would like to know how to set the relevant registers to set Busoff automatic recovery.Thanks!
hi hong.wang,
You can use restart-ms property while setting up CAN network interfaces
For more info:
$ip link set can0 type can help
Thanks,
Shubhi
Is there a way to set up busoff automatic restart
Is there a way to set up busoff automatic restart?
hi hong.wang,
here are the details:
“restart-ms 100”
Automatic restart delay time. If set to a non-zero value, a
restart of the CAN controller will be triggered automatically
in case of a bus-off condition after the specified delay time
in milliseconds. By default it’s off.
You can use it like below:
ip link set can0 type can bitrate 500000 restart-ms 100
Thanks,
Shubhi
thanks
Hello!The project I am developing now requires that the hardware can automatically restore Busoff. Could you provide a similar way to set the hardware-related registers of CAN controller to solve this problem
Hi hing.wang,
Sorry for the late response, have you managed to get issue resolved?
not yet
not yet .
Hi hong.wang,
You can write to register 0xc310018 which is a Mttcan core control register. Set bit field 0 of this register to 1 in case of bus-off.
Let me know if this does not solve your issue.
Thanks,
Shubhi
I initialize can.restart_ ms variable, and then solve the problem
Hi hong.wang,
Good to know that the problem is solved.
Thanks,
Shubhi