CAN Bit Timing
1050
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
Controller Area Network (DCAN) Module
23.3.2 DCAN Bit Timing Registers
In the DCAN, the bit timing configuration is programmed in two register bytes, additionally a third byte for
a baud rate prescaler extension of 4 bits (BREP) is provided. The sum of Prop_Seg and Phase_Seg1 (as
TSEG1) is combined with Phase_Seg2 (as TSEG2) in one byte, SJW and BRP (plus BRPE in third byte)
are combined in the other byte
In this bit timing register, the components TSEG1, TSEG2, SJW and BRP have to be programmed to a
numerical value that is one less than its functional value; so instead of values in the range of [1… n],
values in the range of [0 … n-1] are programmed. That way, SJW (functional range of [1 … 4]) is
represented by only two bits.
Therefore the length of the Bit time is (programmed values) [TSEG1 + TSEG2 + 3] t
q
or (functional values)
[Sy Pr Phas Phase_Seg2] t
q
.
The data in the Bit Timing Register (BTR) is the configuration input of the CAN protocol controller. The
Baud Rate Prescaler (configured by BRPE/BRP) defines the length of the time quantum (the basic time
unit of the bit time); the Bit Timing Logic (configured by TSEG1, TSEG2, and SJW) defines the number of
time quanta in the bit time.
23.3.2.1 Calculation of the Bit Timing Parameters
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.
NOTE:
8 MHz is the minimum CAN clock frequency required to operate the DCAN at a bit rate of
1 MBit/s.
The bit time may consist of 8 to 25 time quanta. The length of the time quantum t
q
is defined by the Baud
Rate Prescaler with t
q
= (Baud Rate Prescaler) / CAN_CLK. Several combinations may lead to the desired
bit time, allowing iterations of the following steps.
First part of the bit time to be defined is the Prop_Seg. Its 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 expandible
CAN bus systems. The resulting time for Prop_Seg is converted into time quanta (rounded up to the
nearest integer multiple of t
q
).
The Sync_Seg is 1 t
q
long (fixed), leaving (bit time – Prop_Seg – 1) t
q
for the two Phase Buffer Segments.
If the number of remaining t
q
is even, the Phase Buffer Segments have the same length, Phase_Seg2 =
Phase_Seg1, else Phase_Seg2 = Phas 1.
The minimum nominal length of Phase_Seg2 has to be regarded as well. Phase_Seg2 may not be shorter
than any CAN controller’s Information Processing Time in the network, which is device dependent and can
be in the range of [0 … 2] t
q
.
The length of the Synchronization Jump Width is set to its maximum value, which is the minimum of 4 and
Phase_Seg1.
If more than one configurations are possible to reach a certain Bit rate, it is recommended to 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’s oscillator tolerance range is limited by the node with the lowest tolerance range.
The calculation may show that bus length or bit rate have to be decreased or that the oscillator
frequencies’ stability has to be increased in order to find a protocol compliant configuration of the CAN bit
timing.