Mttcan does not transmit but receives fine after bus-off recovery

We are using Jetpack 5.1.

The issue we are seeing is that the mttcan is not sending any messages but is receiving fine. Below is the screenshot of me trying to send a can message and read the same back on the can line.

On using ip -d -s link show can0, below is the output I get:

5: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10000
link/can promiscuity 0 minmtu 0 maxmtu 0
can <BERR-REPORTING,FD> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 100
bitrate 250000 sample-point 0.875
tq 20 prop-seg 87 phase-seg1 87 phase-seg2 25 sjw 25
mttcan: tseg1 2…255 tseg2 0…127 sjw 1…127 brp 1…511 brp-inc 1
dbitrate 2000000 dsample-point 0.720
dtq 20 dprop-seg 8 dphase-seg1 9 dphase-seg2 7 dsjw 7
mttcan: dtseg1 1…31 dtseg2 0…15 dsjw 1…15 dbrp 1…15 dbrp-inc 1
clock 50000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
1 11 0 7 3 1 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
66671820 8663578 11 0 0 0
TX: bytes packets errors dropped carrier collsns
136040 17005 0 0 0 0

On using ifconfig can0, I get :

can0: flags=193<UP,RUNNING,NOARP> mtu 72
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10000 (UNSPEC)
RX packets 8628330 bytes 66400566 (66.4 MB)
RX errors 11 dropped 0 overruns 0 frame 0
TX packets 17005 bytes 136040 (136.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 108

On using cansend can0 123#DEADBEEF, the Tx packets stay at 17005 and never increase, almost as if it is not recognizing the command.

On reading the kernel messages using dmesg, I see that the can driver had a series of bit 1 errors and then went through a bus-off recovery and came back online. I am guessing that the mttcan driver is not able to transmit messages after bus-off recovery even though it is reporting everything to be fine.

On rebooting the orin NX, the same works fine until a CAN error causes a bus-off and then we encounter the same issue.

Is this a known issue with mttcan? If yes, could you let me know if there is a jetpack release where this is fixed or if this issue is planned to be fixed in the next releases?

Hi akashmod,

Are you using the devkit or custom board for Orin NX?

There’s a known issue about not recovering from Bus-Off state.
It has been fixed internally and you would get the fix in the next Jetpack release.

Do you know why it enters into BUS_OFF state?
Normally, it may be caused from the wrong connection like short CAN-H/CAN-L together.

I think I know why it goes into a bus-off state. It is because another controller is sending a message of the same CAN ID on the bus, if I am not wrong.
When you say next Jetpack release, do you mean 6.1 that is already released? Or do you mean a release that has not been announced yet? Meanwhile do you have a workaround for this issue? It is impacting us in production.

I believe we are using a custom board.

Both the next Jetpack 5 and Jetpack 6 release should include the fix.

Please try to reproduce on the devkit first and share the steps for us to verify.