I’m using PICAN FD RevC with RPI3. Cansend make interface stuck. CanDump works before I try to send something.
ip -d -s link show can0
4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
link/can promiscuity 0 minmtu 0 maxmtu 0
can <FD> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 500000 sample-point 0.800
tq 25 prop-seg 31 phase-seg1 32 phase-seg2 16 sjw 1
mcp251xfd: tseg1 2..256 tseg2 1..128 sjw 1..128 brp 1..256 brp-inc 1
dbitrate 2000000 dsample-point 0.800
dtq 25 dprop-seg 7 dphase-seg1 8 dphase-seg2 4 dsjw 1
mcp251xfd: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..256 dbrp-inc 1
clock 40000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped missed mcast
18624 291 0 101 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
After I tried cansend
cansend can0 016#1111
pi@rpican:~ $ ip -d -s link show can0
4: can0: <NO-CARRIER,NOARP,UP,ECHO> mtu 72 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 10
link/can promiscuity 0 minmtu 0 maxmtu 0
can <FD> state BUS-OFF (berr-counter tx 256 rx 0) restart-ms 0
bitrate 500000 sample-point 0.800
tq 25 prop-seg 31 phase-seg1 32 phase-seg2 16 sjw 1
mcp251xfd: tseg1 2..256 tseg2 1..128 sjw 1..128 brp 1..256 brp-inc 1
dbitrate 2000000 dsample-point 0.800
dtq 25 dprop-seg 7 dphase-seg1 8 dphase-seg2 4 dsjw 1
mcp251xfd: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..256 dbrp-inc 1
clock 40000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 1 1 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped missed mcast
24448 382 0 101 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
I have to reboot RPI to make CANDUMP work again. Why does CAN Send make it stuck?