|
LM3S5D56 Datasheet, PDF (768/1146 Pages) Texas Instruments – Stellaris® LM3S5D56 Microcontroller | |||
|
◁ |
Controller Area Network (CAN) Module
Figure 16-4. CAN Bit Time
Sync
Prop
Nominal CAN Bit Time
a
TSEG1
Phase1 c
b
TSEG2
Phase2
1 Time
Quantum
( t qq )
a. TSEG1 = Prop + Phase1
b. TSEG2 = Phase2
c. Phase1 = Phase2 or Phase1 + 1 = Phase2
Sample
Point
Table 16-3. CAN Protocol Rangesa
Parameter
Range
Remark
BRP
[1 .. 64]
Defines the length of the time quantum tq. The CANBRPE register can
be used to extend the range to 1024.
Sync
1 tq
Fixed length, synchronization of bus input to system clock
Prop
[1 .. 8] tq
Compensates for the physical delay times
Phase1
[1 .. 8] tq
May be lengthened temporarily by synchronization
Phase2
[1 .. 8] tq
May be shortened temporarily by synchronization
SJW
[1 .. 4] tq
May not be longer than either Phase Buffer Segment
a. This table describes the minimum programmable ranges required by the CAN protocol.
The bit timing configuration is programmed in two register bytes in the CANBIT register. In the
CANBIT register, the four components TSEG2, TSEG1, 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, for example, SJW (functional range of
[1..4]) is represented by only two bits in the SJW bit field. Table 16-4 shows the relationship between
the CANBIT register values and the parameters.
Table 16-4. CANBIT Register Values
CANBIT Register Field
TSEG2
TSEG1
SJW
BRP
Setting
Phase2 - 1
Prop + Phase1 - 1
SJW - 1
BRP
Therefore, the length of the bit time is (programmed values):
[TSEG1 + TSEG2 + 3] Ã tq
or (functional values):
[Sync + Prop + Phase1 + Phase2] Ã tq
The data in the CANBIT register is the configuration input of the CAN protocol controller. The baud
rate prescaler (configured by the BRP field) defines the length of the time quantum, the basic time
768
January 23, 2012
Texas Instruments-Production Data
|
▷ |