Code: Select all
clock = 45 MHz (this I cannot change)
BRP = 3
Prop Seg + Phase Seg1 = 12
Phase Seg 2 = 2
SJW = 2
There is no change between the tests that I am aware of. As far as I know, no one touched the hardware in the meantime. I'll ask my colleague if he can double-check the cable.
Here is a diagram of my setup:

Cable length between PC and motor board is around 3m.
The configuration:
- The PC is configured to 1 Mbit/s, sample point 0.667 or 0.867.
- The motor board is configured to 1 Mbit/s, sample point 0.867 (see above).
- The laptop is running pcanview and is configured to listen-only, 1 Mbit/s, sample point 0.875 (0.867 was not possible).
With setting the sample point to 0.667 on the PC it was mostly working yesterday. Interestingly when I set it to 0.867 (so it matches the motor board), it was consistently failing.
I repeated the test today (without the laptop connected to the bus) and now 0.867 was working sometimes, 0.667 was still more reliable, though.
Failures are most likely to occur on the first run after initialising the CAN interface on the PC (i.e. on follow-up runs it is more likely to succeed until the interface is re-initialised).
I saw that when only specifying bitrate/sampling point on the PC, the parameter SJW is set to 1. As I read somewhere that SJW should be the same on all devices in the network, I also tried the following configurations (based on the values that were automatically set when specifying bitrate/sampling point, just increasing SJW):
1) For sampling point 0.667
Code: Select all
ip link set canX type can \
tq 12 prop-seg 26 phase-seg1 26 phase-seg2 27 sjw 2 \
fd off fd-non-iso off
Code: Select all
ip link set canX type can \
tq 12 prop-seg 34 phase-seg1 34 phase-seg2 11 sjw 2 \
fd off fd-non-iso off
Since there is some non-determinism in the results I'll repeat the tests a few times in the next days.
In case I still get errors, would it make sense to increase SJW further (both on PC and motor board)?