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
Functional Description
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.3.16.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 four 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 (see
Figure 23-17. 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…–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 (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.
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. The BSP translates messages into frames and vice versa. It generates
and discards the enclosing fixed format bits, inserts and extracts stuff bits, calculates and checks the CRC
code, performs the error management, and decides which type of synchronization is to be used. It is
evaluated at the sample point and processes the sampled bus input bit. The time after the sample point
that is needed to calculate the next bit to be sent (e.g., data bit, CRC bit, stuff bit, error flag, or idle) is
called the information processing time (IPT), which is 0 tq for the DCAN.
3912
Controller Area Network (CAN)
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated