My CAN driver wants a prescaler, two time segments and an SJW value instead of just a baud rate. The CAN peripheral clock is 8 MHz and I need 500 kbit/s to talk to a commercial device. Online calculators list several valid combinations, and with the first one I tried the other device produced error frames now and then.
How are these numbers derived, which combination should I prefer, and how does cable length come into it?




