I-7530, I-7530A, I-7565, I-7530-FT, tM-7530, tM-7530A, tM-7565 User Manual Version 1.6
Page:
92
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: [email protected]
In addition, when Tbit is fixed at 500, the maximum value of (4 + PRS + PHS1 +
PHS2) is limited to 25, and the maximum value of BRP in the register Bit Timing 1 i s 63,
so (4 + PRS + PHS1 + PHS2) will be in the range of 8~25, and (BRP + 1) will be in the
range of 20~62, that is to say, the range of BRP will be in the range of 19~61.
For example, when the system clock is 20MHz and the CAN baud rate is 40K bps,
the CAN converter is divided into 500 time slices (TQ) in a time width Tbit of one bit. If
(4 + PRS + PHS1 + When PHS2) is fixed to 20, the BRP value
T
bit
= 500 * TQ = (4 + PRS + PHS1 + PHS2) * (BRP + 1) * TQ
T
bit
= 500 / 20 = (BRP + 1) = 25
BRP = 24
In addition, because (4 + PRS + PHS1 + PHS2) is fixed at 20, the user can know
the time width of one bit that containe the number of time slices is Tbit = 4 + PRS +
PHS1 + PHS2 = 20, but now can't determine the values of these three parameters, so
necessary to calculate the values of these three parameters according to the
proportional value of the sample point as below.
The sample point is mean that the position of the proportion in a bit time width Tbit.
That is to say, if a bit time width Tbit is 0~100%, and the sampling point is 60 that mean
the posotion of sampling point is the 60% in a bit time width Tbit. The sampling point be
calculated as below:
Sample point = (T
syns
+ T
prs
+ T
phs1
) / T
bit
= (T
syns
+ T
prs
+ T
phs1
) / (T
syns
+ T
prs
+ T
phs1
+ T
phs2
)
= [1 * TQ + (PRS + 1) * TQ + (PHS1 + 1) * TQ] / TQ * (4 + PRS + PHS1 + PHS2)
=
TQ * [1 + (PRS + 1) * TQ + (PHS1 + 1)] / TQ * (4 + PRS + PHS1 + PHS2)
=
TQ * (3 + PRS + PHS1) / TQ * (4 + PRS + PHS1 + PHS2)
= (3 + PRS + PHS1) / (4 + PRS + PHS1 + PHS2)
If as mentioned above, the time width of one bit is Tbit = 4 + PRS + PHS1 + PHS2,
and the sum must be 20, when the sampling point is 60%, then
0.6 = (3 + PRS + PHS1) / (4 + PRS + PHS1 + PHS2)
(3 + PRS + PHS1) = 0.6 * 20 = 12