Figure 16-7. Sample and Transmission Point
Bit Timing
PRS (3-bit length)
Sample
Point
PHS1 (3-bit length)
PHS2 (3-bit length)
SJW (2-bit length)
Fcan (Tscl)
Time Quantum
CLKIO
Prescaler BRP
Transmission
Point
Figure 16-8. General Structure of a Bit Period
1
/
CLK
IO
CLK
IO
Bit Rate
Prescaler
Tscl (TQ)
F
CAN
Data
one nominal bit
Tsyns (5)
Tprs
Tphs1 (1)
Tphs2 (2)
Notes: 1. Phase error ≤ 0
2. Phase error ≥ 0
or
or
Tphs1+Tsjw (3)
Tphs2+Tsjw (4)
3. Phase error > 0
4. Phase error < 0
5. Synchronization Segment: SYNS
Tsyns = 1xTscl (fixed)
Tbit
Sample
Point
Transmission
Point
16.4.3 Baud Rate
With no baud rate prescaler (BRP[5..0]=0) the sampling point comes one time quantum too early. This leads to a fail
according the ISO16845 Test plan. It is necessary to lengthen the phase segment 1 by one time quantum and to shorten the
phase segment 2 by one time quantum to compensate.
The baud rate selection is made by T calculation:
bit
Tbit(1) = Tsyns + Tprs + Tphs1 + Tphs2
1. Tsyns = 1 x Tscl = (BRP[5..0]+ 1)/clkIO (= 1TQ)
2. Tprs = (1 to 8) x Tscl = (PRS[2..0]+ 1) x Tscl
3. Tphs1 = (1 to 8) x Tscl = (PHS1[2..0]+ 1) x Tscl
4. Tphs2 = (1 to 8) x Tscl = (PHS2[2..0](2)+ 1) x Tscl
5. Tsjw = (1 to 4) x Tscl = (SJW[1..0]+ 1) x Tscl
Notes: 1. The total number of Tscl (Time Quanta) in a bit time must be from 8 to 25.
2. PHS2[2..0] 2 is programmable to be ≤ PHS1[2..0] and ≥ 1.
16.4.4 Fault Confinement
(c.f. Section 16.7 “Error Management” on page 153).
148
ATmega16/32/64/M1/C1 [DATASHEET]
7647O–AVR–01/15