Datasheet

UM10398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2014. All rights reserved.
User manual Rev. 12.3 — 10 June 2014 318 of 547
NXP Semiconductors
UM10398
Chapter 16: LPC111x/LPC11Cxx C_CAN controller
16.7.5.1 Bit time and bit rate
CAN supports bit rates in the range of lower than 1 kBit/s up to 1000 kBit/s. Each member
of the CAN network has its own clock generator, usually a quartz oscillator. The timing
parameter of the bit time (i.e. the reciprocal of the bit rate) can be configured individually
for each CAN node, creating a common bit rate even though the CAN nodes’ oscillator
periods (f
osc
) may be different.
The frequencies of these oscillators are not absolutely stable, as small variations are
caused by changes in temperature or voltage and by deteriorating components. As long
as the variations remain inside a specific oscillator tolerance range (df), the CAN nodes
are able to compensate for the different bit rates by re-synchronizing to the bit stream.
According to the CAN specification, the bit time is divided into four segments (Figure 67
).
The Synchronization Segment, the Propagation Time Segment, the Phase Buffer
Segment 1, and the Phase Buffer Segment 2. Each segment consists of a specific,
programmable number of time quanta (see Table 278
). The length of the time quantum
(t
q
), which is the basic time unit of the bit time, is defined by the CAN controller’s system
clock f and the Baud Rate Prescaler (BRP): t
q
= BRP / f
sys
. The C_CAN’s system clock f
sys
is the frequency of the LPC11Cx system clock (see Section 16.2
).
The Synchronization Segment Sync_Seg is the part of the bit time where edges of the
CAN bus level are expected to occur; the distance between an edge that occurs outside of
Sync_Seg and the Sync_Seg is called the phase error of that edge. The Propagation
Time Segment Prop_Seg is intended to compensate for the physical delay times within
the CAN network. The Phase Buffer Segments Phase_Seg1 and Phase_Seg2 surround
the Sample Point. The (Re-)Synchronization Jump Width (SJW) defines how far a
re-synchronization may move the Sample Point inside the limits defined by the Phase
Buffer Segments to compensate for edge phase errors.
Table 278
describes the minimum programmable ranges required by the CAN protocol.
Bit time parameters are programmed through the CANBT register, Table 249
. For details
on bit timing and examples, see the C_CAN user’s manual, revision 1.2.
Table 278. Parameters of the C_CAN bit time
Parameter Range Function
BRP (1...32) Defines the length of the time quantum t
q
.
SYNC_SEG 1t
q
Synchronization segment. Fixed length. Synchronization
of bus input to system clock.
PROP_SEG (1...8) t
q
Propagation time segment. Compensates for physical
delay times. This parameter is determined by the system
delay times in the C_CAN network.
PHASE_SEG1 (1...8) t
q
Phase buffer segment 1. May be lengthened temporarily
by synchronization.
PHASE_SEG2
(TSEG2)
(1...8) t
q
Phase buffer segment 2. May be shortened temporarily by
synchronization.
SJW (1...4) t
q
(Re-) synchronization jump width. May not be longer than
either phase buffer segment.