NUC970 Technical Reference Manual
Publication Release Date: Dec. 15, 2015
- 792 -
Revision V1.30
NUC97
0
T
E
CHNIC
A
L
RE
F
E
RE
N
CE
MA
NUA
L
each time quantum. The rest of the CAN protocol controller, the BSP (Bit Stream Processor) state
machine is evaluated once each bit time, at the Sample Point.
The Shift Register sends the messages ser
ially and parallelizes received messages. It’s 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 that is needed to calculate the next
bit to be sent after the Sample point (e.g. data bit, CRC bit, stuff bit, error flag, or idle) is called the
Information Processing Time (IPT).
The IPT is application specific but may not be longer than 2 tq; the IPT for the C_CAN is 0 tq. Its
length is the lower limit of the programmed length of Phase_Seg2. In case of a synchronization,
Phase_Seg2 may be shortened to a value less than IPT, which does not affect bus timing.
Calculating Bit Timing Parameters
5.24.7.21
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 APB clock period.
The bit time may consist of 4 to 25 time quanta, the length of the time quantum tq is defined by the
Baud Rate Prescaler with t
q
= (Baud Rate Prescaler)/f
apb_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 APB clock. 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 tq).
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,
The minimum nominal length of Phase_Seg2 has to be regarded as well. Phase_Seg2 may not be
shorter than the IPT of the CAN controller, which, depending on the actual implementation, is 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.
The oscillator tolerance range necessary for the resulting configuration is calculated by the formulas
given in Section 5.13.6.10.4: Oscillator Tolerance Range
If more than one configuration is possible, that configuration allowing the highest oscillator tolerance
range should be chosen.
CAN nodes with different system 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 oscillator tolerance range of the CAN systems is limited by that node with the lowest tolerance
range.
The calculation may show that bus length or bit rate have to be decreased or that the stability of the
oscillator frequency has to be increased in order to find a protocol compliant configuration of the CAN
bit timing. The resulting configuration is written into the Bit Timing Register: (Phase_Seg2-1) &
(PhaProp_Seg-1) & (SynchronisationJumpWidth-1)&(Prescaler-1)