SPRUHM9H October 2014 – May 2024 TMS320F28075 , TMS320F28075-Q1 , TMS320F28076
Usually, the calculation of the bit timing configuration starts with a desired bit rate or bit time. The resulting Bit time (1/Bit rate) must be an integer multiple of the CAN clock period.
The bit time can consist of 8 to 25 time quanta. The length of the time quantum tq is defined by the Baud Rate Prescaler with tq = (Baud Rate Prescaler) / CAN_CLK. Several combinations can lead to the desired bit time, allowing iterations of the following steps.
The first part of the bit time to be defined is the Prop_Seg. The length depends on the delay times measured in the system. A maximum bus length as well as a maximum node delay has to be defined for expandable CAN bus systems. The resulting time for Prop_Seg is converted into time quanta (rounded up to the nearest integer multiple of tq).
The Sync_Seg is 1 tq long (fixed), leaving (bit time - Prop_Seg - 1) tq for the two Phase Buffer Segments. If the number of remaining tq is even, the Phase Buffer Segments have the same length, Phase_Seg2 = Phase_Seg1; else, Phase_Seg2 = Phase_Seg1 + 1.
The minimum nominal length of Phase_Seg2 has to be regarded as well. Phase_Seg2 cannot be shorter than the Information Processing Time of any node in the network, which is device dependent and can be in the range of [0 to 2] tq.
The length of the synchronization jump width is set to the maximum value, which is the minimum of 4 and Phase_Seg1.
The oscillator tolerance range necessary for the resulting configuration is calculated by the formulas given in Section 21.11.1.4.
If more than one configurations are possible to reach a certain bit rate, choose the configuration that allows the highest oscillator tolerance range.
CAN nodes with different clocks require different configurations to come to the same bit rate. The calculation of the propagation time in the CAN network, based on the nodes with the longest delay times, is done once for the whole network.
The CAN system oscillator tolerance range is limited by the node with the lowest tolerance range.
The calculation can show that bus length or bit rate has to be decreased or that the oscillator frequency stability has to be increased to find a protocol compliant configuration of the CAN bit timing.
The resulting configuration is written into the Bit Timing register: