Bit
register
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Bit
Timing
1
-
BRP5 BRP4 BRP3 BRP2 BRP1 BRP0 -
Bit
Timing
2
-
SJW1 SJW0 -
PRS2 PRS1 PRS0 -
Bit
Timing
3 -
PHS22 PHS21 PHS20 PHS12 PHS11 PHS10 SMP
Figure: General structure of a bit period
Generally, the register of SJW0, SWJ1 and SMP are always 0. One bit time consists of the time
T
syns
, T
prs
, T
phs1
, and T
phs2
, and can be divided into numbers of time slice (TQ) according to the
system clock. The formula is shown below:
Numbers of TQ = (System Clock) / (CAN Baud Rate)
For example, when the CAN baud rate is 40 kbps, the numbers of TQ would be (20 MHz) / (40
Kbps) = 500. It means that the CAN converter can divided one bit time into 500 parts. The
register PRS, PHS1, and PHS2 indicates the numbers of the time slice for T
prs
, T
phs1
, and T
phs2
.
The formulas are shown below.
T
prs
= (PRS+1) * TQ
T
phs1
= (PHS1+1)* TQ
T
phs2
= (PHS2 +1)* TQ
Because the T
syns
is defined to 1 TQ, therefore one bit time can be presented as below.
T
bit
= 1 TQ + (PRS+1) * TQ + (PHS1+1)* TQ +(PHS2 +1)* TQ
And the sample point is defined below:
I-7530, I-7530-FT, I-7530A, I-7565, tM-7530, tM-7530A, tM-7565 User Manual Version 1.5
Page
:
64
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: [email protected]