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?