Sample_Point
Bit_to_send
Sync_Mode
Bus-Off
Scaled_Clock (tq)
System clock
Receive_Data
Transmit_Data
Control
Received_Message
Send_Message
Status
Bit
timing
logic
Baudrate_
prescaler
Sampled_Bit
Configuration (TSEG1, TSEG2, SJW)
Configuration (BRPE/BRP)
Shift-Register
Received_Data_Bit
Next_Data_Bit
Control
B
it
s
tr
e
a
m
p
ro
c
e
s
s
o
r
IP
T
CAN Bit Timing
1572
SPRUHE8E – October 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
M3 Controller Area Network (CAN)
It has to be considered that SJW may not be larger than the smaller of the phase buffer segments and
that the propagation time segment limits that part of the bit time that may be used for the phase buffer
segments.
The combination Prop_Seg = 1 and Phase_Seg1 = Phase_Seg2 = SJW = 4 allows the largest possible
oscillator tolerance of 1.58%. This combination with a Propagation Time Segment of only 10% of the bit
time is not suitable for short bit times; it can be used for bit rates of up to 125 kBit/s (bit time = 8
μ
s) with a
bus length of 40 m.
23.12.2 Configuration of the CAN Bit Timing
In the CAN, the bit timing configuration is programmed in two register bytes, additionally a third byte for a
baud rate prescaler extension of 4 bits (BRPE) 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 (see
Figure 23-15. Structure of the CAN Core's CAN Protocol Controller
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, e.g. 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 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.
The processing of the bit time, the calculation of the position of the Sample Point, and occasional
synchronizations are controlled by the Bit timing state machine, which is evaluated once each time
quantum. The rest of the CAN protocol controller, the Bit Stream Processor (BSP) state machine, is
evaluated once each bit time, at the Sample Point.
The Shift register serializes the messages to be sent and parallelizes received messages. Its loading and
shifting is controlled by the BSP.