I'm using a PCAN-M.2 interface on a Intel NUC7i7DNBE to communicate with a machine over a 500 kbit CAN bus. The CAN bus on this machine has 2 custom boards and 3 IFM RM9000 CANOpen encoders connected, so combined with the NUC there are 6 nodes on the bus. The bus is properly terminated at both ends. On the NUC I have Ubuntu 18.04 installed (kernel 5.4.0-51), I'm using mainline netdev.
As long as the NUC is not connected, the CAN bus communication between the 5 connected nodes works fine, the software running on one of the custom boards can read encoder values and so on and the 2 custom boards can communicate with each other.
As long as the 3 encoders are not connected, the NUC can receive all communication on the bus from the 2 custom boards without any problems. I have not tried transmitting anything from the NUC yet, as I first wanted the bus to work fine with all nodes connected.
When I connect both the encoders and the NUC with the PCAN-M.2 interface, the PCAN-M.2 starts returning error frames as follows:
Code: Select all
$ candump -tA -e can0,0~0,#FFFFFFFF
(2020-10-20 13:14:44.043915) can0 20000004 [8] 00 04 00 00 00 00 00 63 ERRORFRAME
controller-problem{rx-error-warning}
error-counter-tx-rx{{0}{99}}
(2020-10-20 13:14:44.043916) can0 20000004 [8] 00 10 00 00 00 00 00 87 ERRORFRAME
controller-problem{rx-error-passive}
error-counter-tx-rx{{0}{135}}
(2020-10-20 13:14:44.050835) can0 20000004 [8] 00 04 00 00 00 00 00 7F ERRORFRAME
controller-problem{rx-error-warning}
error-counter-tx-rx{{0}{127}}
When I configure can0 as listen-only, there seems to be no problem and all messages are received.
My problem solving experience while using CAN is limited, I don't really understand what this error means, so I didn't really know where to start looking.
In an attempt to learn something, I tried using the proprietary driver. Unfortunately I shows the same problem, I've attached a trace that I created using pcanview. While using pcanview I also tried different clock speeds, but no improvement unfortunately.
For reference the output of ip link:
Code: Select all
$ ip -d -s link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/can promiscuity 0
can state ERROR-ACTIVE (berr-counter tx 0 rx 85) restart-ms 100
bitrate 500000 sample-point 0.875
tq 12 prop-seg 69 phase-seg1 70 phase-seg2 20 sjw 1
peak_canfd: tseg1 1..256 tseg2 1..128 sjw 1..128 brp 1..1024 brp-inc 1
peak_canfd: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..1024 dbrp-inc 1
clock 80000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1744 1720 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
85548 14763 0 3537 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
$ ip -d -s link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/can promiscuity 0
can state ERROR-WARNING (berr-counter tx 0 rx 127) restart-ms 100
bitrate 500000 sample-point 0.875
tq 12 prop-seg 69 phase-seg1 70 phase-seg2 20 sjw 1
peak_canfd: tseg1 1..256 tseg2 1..128 sjw 1..128 brp 1..1024 brp-inc 1
peak_canfd: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..1024 dbrp-inc 1
clock 80000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1819 1794 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
87688 15083 0 3537 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
$ ip -d -s link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/can promiscuity 0
can state ERROR-PASSIVE (berr-counter tx 0 rx 135) restart-ms 100
bitrate 500000 sample-point 0.875
tq 12 prop-seg 69 phase-seg1 70 phase-seg2 20 sjw 1
peak_canfd: tseg1 1..256 tseg2 1..128 sjw 1..128 brp 1..1024 brp-inc 1
peak_canfd: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..1024 dbrp-inc 1
clock 80000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1834 1809 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
88580 15238 0 3537 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0