主频(Hz) 目标BRP 实际BRP prop
(the main
(Target BRP) (Actual BRP)
frequency)
DEC HEX DEC
BRP计算
(BRP
calculation)
206875000 205.875 206 CE 0
206875000 88.9456521739 89 59 0
206875000 4.99637681159 5 05 0
206875000 62.6538461538 63 3F 0
206875000 30.8269230769 31 1F 0
206875000 14.9134615385 15 0F 0
206875000 6.95673076923 7 07 0
计算过程如下
①、用户提供需要的波特率;
②、调整时间份额sum,调整原则为:时间份额sum(L列)尽可能大,并且波特率偏差尽可能小。从最大值25开始递减去试,找一个合适的值。
③、找到合适时间份额sum后,可以确定prop、seg1和seg2的值,计算公式为:时间份额sum=prop+seg+seg2+4。T5L内,prop建议需要设置成0。Seg1和Se
右。
④、sjw需要根据实际情况配置。可以在 [1,协议要求最大值] 之间尝试。从小到大调整,表格建议使用值给出了最小值。
⑤、根据表格黄色部分,配置T5L CAN对应的寄存器。
The calculation process is as follows
① The user provides the required Baud rate;
② Adjust the time share sum. The adjustment principle is: the time share sum (column L) should be as large as possible, a
decreasing from the maximum value of 25 and try to find a suitable value.
③ After finding the appropriate time share sum, the values of prop, seg1, and seg2 can be determined. The calculation fo
suggests setting it to 0. Seg1 and Seg2 need to be set according to the manufacturer's needs. After the adjustment is comp
considered that the recommended sampling point is around 75%.
④ SJW needs to be configured according to the actual situation. You can try between [1, the maximum value required by
values in the table provide the minimum values.
⑤ According to the yellow section of the table, configure the registers corresponding to T5L CAN.
时间份额sum
prop seg1 seg2 (the time
share)
HEX HEX HEX
(BTR0低4位) DEC (BTR1高4位) DEC (BTR1低4位)
BTR0 low 4 bits BTR1 high 4 bits BTR1 low 4 bits
0 15 F 6 6 25
0 15 F 4 4 23
0 15 F 4 4 23
0 7 7 2 2 13
0 7 7 2 2 13
0 7 7 2 2 13
0 7 7 2 2 13
递减去试,找一个合适的值。
+seg2+4。T5L内,prop建议需要设置成0。Seg1和Seg2需要根据厂家需求情况来设置。调整完成后,需要L列的值等于M列。可以考虑建议采样点在75%左
(column L) should be as large as possible, and the Baud rate deviation should be as small as possible. Start
seg2 can be determined. The calculation formula is: time share sum=prop+seg+seg2+4. Within T5L, prop
urer's needs. After the adjustment is completed, the value of column L needs to be equal to column M. It can be
etween [1, the maximum value required by the protocol]. Adjusting from small to large, the recommended
onding to T5L CAN.
实际时间份额sum 采样点 sjw
(Actual time share) (Sampling points)
协议要求最大值 协议要求最小值
(Protocol (Protocol 使用值 HEX
requirement requirement (usage (BTR0高4位)
maximum Minimum value) BTR0 high 4 bits
value) value)
25 72.00% 4 1 1 2
23 78.26% 4 1 1 2
23 78.26% 4 1 1 2
13 76.92% 4 1 2 4
13 76.92% 4 1 2 4
13 76.92% 4 1 2 4
13 76.92% 4 1 2 4
实际波特率 目标波特率
(Hz) 波特率偏差
(Hz) (Baud rate
(the target Baud
(Acutal Baud rate) deviation)
rate)
19987.922705314 20000 -0.06%
49969.806763285 50000 -0.06%
749547.101449275 750000 -0.06%
124323.918269231 125000 -0.54%
248647.836538462 250000 -0.54%
497295.673076923 500000 -0.54%
994591.346153846 1000000 -0.54%
主频(Hz) 目标BRP 实际BRP prop
(the main
(Target BRP) (Actual BRP)
frequency)
HEX
DEC HEX DEC (BTR0低4位)
BTR0 low 4 bits
波特率计算
(Baud rate
calculation)
206875000 46 46 2E 0 0
求波特率计算:输入brp、时间份额sum值,求实际波特率。
Calculate Baud rate: enter brp and time share sum to calculate the actual Baud rate.
时间份额sum 实际时间份额sum
seg1 seg2 (the time (Actual time
share) share)
HEX HEX
DEC (BTR1高4位) DEC (BTR1低4位)
BTR1 high 4 bits BTR1 low 4 bits
15 F 3 3 22 22
采样点 实际波特率 目标波特率
(Hz) (Hz)
(Sampling sjw
(Acutal Baud (the target
points) rate) Baud rate)
协议要求最大值 协议要求最小值
(Protocol (Protocol 使用值 HEX
requirement requirement (usage (BTR0高4位)
maximum Minimum value) BTR0 high 4 bits
value) value)
81.82% 4 1 1 2 100036.266925 100000
波特率偏差
(Baud rate
deviation)
0.04%