Atmel Xplained Pro Evaluation Kit ATSAM4E-XPRO ATSAM4E-XPRO Fiche De Données

Codes de produits
ATSAM4E-XPRO
Page de 1506
663
SAM4E [DATASHEET]
Atmel-11157D-ATARM-SAM4E16-SAM4E8-Datasheet_12-Jun-14
Example of bit timing determination for CAN baudrate of 500 Kbit/s:
f
Peripheral clock
 = 48 MHz
CAN baudrate = 500 Kbit/s => bit time = 2 µs
Delay of the bus driver: 50 ns
Delay of the receiver: 30 ns
Delay of the bus line (20 m): 110 ns
The total number of time quanta in a bit time must be comprised between 8 and 25. If we fix the bit time to 16 
time quanta:
t
CSC
 = 1 time quanta = bit time / 16 = 125 ns
=> BRP = (t
CSC
 x f
peripheral clock
) - 1 = 5
The propagation segment time is equal to twice the sum of the signal’s propagation time on the bus line, the 
receiver delay and the output driver delay:
t
PRS
 = 2 * (50+30+110) ns = 380 ns = 3 t
CSC
=> PROPAG = t
PRS
/t
CSC
 - 1 = 2
The remaining time for the two phase segments is:
t
PHS
1 + t
PHS
2 = bit time - t
CSC
 - t
PRS
 = (16 - 1 - 3)t
CSC
t
PHS
1 + t
PHS
2 = 12 t
CSC
Because this number is even, we choose t
PHS
2 = t
PHS
1 (else we would choose t
PHS
2 = t
PHS
1 + t
CSC
).
t
PHS
1 = t
PHS
2 = (12/2) t
CSC
 = 6 t
CSC
=> PHASE1 = PHASE2 = t
PHS
1/t
CSC
 - 1 = 5
The resynchronization jump width must comprise between one t
CSC
 and the minimum of four t
CSC
 and t
PHS
1. 
We choose its maximum value:
t
SJW
 = Min(4 t
CSC
,t
PHS
1) = 4 t
CSC
=> SJW = t
SJW
/t
CSC
 - 1 = 3
Finally: CAN_BR = 0x00053255
CAN Bus Synchronization
Two types of synchronization are distinguished: “hard synchronization” at the start of a frame and
“resynchronization” inside a frame. After a hard synchronization, the bit time is restarted with the end of the
SYNC_SEG segment, regardless of the phase error. Resynchronization causes a reduction or increase in the bit
time so that the position of the sample point is shifted with respect to the detected edge.
The effect of resynchronization is the same as that of hard synchronization when the magnitude of the phase error
of the edge causing the resynchronization is less than or equal to the programmed value of the resynchronization
jump width (t
SJW
). 
When the magnitude of the phase error is larger than the resynchronization jump width and 
the phase error is positive, then PHASE_SEG1 is lengthened by an amount equal to the resynchronization 
jump width.