C8051F040/1/2/3/4/5/6/7
Rev. 1.5
229
18.1.1. CAN Controller Timing
The CAN controller’s system clock (fsys) is derived from the CIP-51 system clock (SYSCLK). Note that an
external oscillator (such as a quartz crystal) is typically required due to the high accuracy requirements for
CAN communication. Refer to Section “4.10.4 Oscillator Tolerance Range” in the Bosch CAN User’s Guide
for further information regarding this topic.
18.1.2. Example Timing Calculation for 1 Mbit/Sec Communication
This example shows how to configure the CAN contoller timing parameters for a 1 Mbit/Sec bit rate.
Table 18.1 shows timing-related system parameters needed for the calculation.
Each bit transmitted on a CAN network has 4 segments (Sync_Seg, Prop_Seg, Phase_Seg1, and
Phase_Seg2), as shown in
Figure 18.3. The sum of these segments determines the CAN bit time (1/bit
rate). In this example, the desired bit rate is 1 Mbit/sec; therefore, the desired bit time is 1000 ns.
Figure 18.3. Four Segments of a CAN Bit Time
Table 18.1. Background System Information
Parameter
Value
Description
CIP-51 system clock (SYSCLK)
22.1184 MHz
External oscillator in ‘Crystal Oscillator Mode’. A
22.1184 MHz quartz crystal is connected between
XTAL1 and XTAL2.
CAN Controller system clock
(fsys)
22.1184 MHz
Derived from SYSCLK.
CAN clock period (tsys)
45.211 ns
Derived from 1/fsys.
CAN time quantum (tq)
45.211 ns
Derived from tsys x BRP
1,2
CAN bus length
10 m
5 ns/m signal delay between CAN nodes.
Propagation delay time3
400 ns
2 x (transceiver loop delay + bus line delay)
Notes:
1. The CAN time quantum (tq) is the smallest unit of time recognized by the CAN contoller. Bit timing parameters
are often specified in integer multiples of the time quantum.
2. The Baud Rate Prescaler (BRP) is defined as the value of the BRP Extension Register plus 1. The BRP
Extension Register has a reset value of 0x0000; the Baud Rate Prescaler has a reset value of 1.
3. Based on an ISO-11898 compliant transceiver. CAN does not specify a physical layer.
Prop_Seg
Phase_Seg1
Phase_Seg2
CAN Bit Time (4 to 25 t
q)
Sync_Seg
1t
q
1 to 8 t
q
1 to 8 t
q
1 to 8 t
q
1t
q
Sample Point