How to Adjust a FD Baudrate with the XL Driver Library
The following values are required in:
|Baud rate:||5 kB…2 Mbit (depending on the transceiver)|
|tseg1, tseg2:||< 255|
|tseg1+tseg2+1 (btl)||> 4|
|Baud rate:||25 kB…10 Mbit (depending on the transceiver)|
|tseg1, tseg2:||< 127|
|tseg1+tseg2+1 (btl)||> 3|
Furthermore there are combinations, even within the range of value, which are not possible. It depends on the internal calculated prescaler (or BTL).These parameters can also be taken from the CAN FD (respectively CAN 2.0).
With CANoe CAN FD Powertrain example you are able to check the sample point and parameter for BTR register.
Regarding the relation of SJW ≤ TSEG2:
Resynchronization results in PS1 being lengthened or PS2 being shortened by the number of TQ specified by the synchronization jump width (SJW), so PS2 can never be shorter than SJW. The number of TQ required for SJW depends on the clock tolerance of CAN controllers, with crystal oscillators typically allowing the minimum TQ for SJW and PS2.
See also article 861.