STM32的CAN波特率计算
来源:互联网 发布:php手机投票系统源码 编辑:程序博客网 时间:2024/05/18 00:13
波特率=APB1Clock/(1+CAN_BS1+CAN_BS2)/CAN_Prescaler
(PS:CAN_SJW表示重新同步跳跃宽度,不参与波特率的计算,其值可以编程为1到4个时间单元,表示该总线对波特率范围的容差度。公式中1表示同步段固定为一个单位时间。)
eg:APB1Clock=36Mhz,CAN_BS1=3,CAN_BS2=5,CAN_Prescaler=32
36000k/9/32=125k/s
另外,尽可能地把采样点设置为CiA推荐的值:
CiA波特率75%>800K80%>500K87.5%<=500KCiA计算方式:(1+CAN_BS1)/(1+CAN_BS1+CAN_BS2)
???采样点设置的影响:采样点设置的符合表格中的范围,CAN通信 会更稳定。
The CAN bit comprises – depending on the configured “atomic” time unit called time quantum (tq) – multiple of these time quanta. The time quanta length derives from the bit-rate prescaler and the used oscillator frequency.
The CAN bit is logically divided into four segments. The synchronization segment has always a length of 1 tq. The following propagation segment and phase-segment 1 are not distinguishable for the user. It is configured as one value. The forth part is the phase-segment 2. Between the two phase-segments, the sample-point is located. If the bit-timing settings move the sample-point to the end of the bit, the propagation segment is enlarged, so that you can realize longer networks. If the sample-point is configured in the other direction, the re-synchronization capability is increased.
CAN位时间逻辑上分为四个段。同步段总是长度为1 tq。后面的传播段和相位段1对于用户是不可区分的。它被配置为一个值。第四部分是相位段2.在两个相位段之间,定位采样点。如果位定时设置将采样点移动到位的结尾,则传播段被放大,以便可以实现更长的网络。如果采样点在另一个方向配置,则重新同步功能会增加。
所有连接的CAN节点的采样点应该相同。然而,在实践中,如果采样点区别不大就足够了。汽车行业为SAE J2284系列中的位定时设置指定了一些建议。对于CANopen网络,应使用CiA 301中给出的建议。采样点应为位时间的87.5%。对于大多数指定的比特率,允许85%至90%的范围。当然,公差范围越大,网络的最大可能长度越短。
- STM32 CAN 波特率的计算
- STM32的CAN波特率计算
- STM32的CAN波特率计算
- stm32 can波特率计算
- CAN波特率的计算
- CAN波特率的简单计算
- CAN波特率的简单计算
- CAN波特率计算的内幕
- CAN波特率计算的内幕
- stm32 can波特率
- CAN波特率设置时的参数计算
- CAN波特率设置时的参数计算
- stm32波特率计算
- CAN波特率计算
- CAN波特率计算
- CAN波特率计算
- STM32之CAN---配置波特率
- STM32之CAN---配置波特率
- DB2查看配置
- java SpringMVC 邮件发送配置及Code
- 获取到session中key和value的方法
- Spark:Yarn-cluster和Yarn-client区别与联系
- Kotlin使用(一)基本语法
- STM32的CAN波特率计算
- 在ABAP/4中声明表格控制
- Docker入门六部曲——基本引导
- 用Appium让Android功能自动化测试飞起来
- 如何给线程命名
- 《顺序表和单链表的区别及应用场景+单链表经典例题》
- 各种容器和服务器之间的区别和联系
- 给文件打补丁
- 支付宝APP支付-php后台签名以及验签