在线时间6 小时
UID3234946
注册时间2018-4-17
NXP金币0
该用户从未签到
新手上路
- 积分
- 46
- 最后登录
- 2021-11-24
|
楼主 |
发表于 2018-5-22 11:33:51
|
显示全部楼层
本帖最后由 所-长 于 2018-5-22 13:24 编辑
继续研究 手册:
截图 中的 第四个参数 :Prescaler Division Factor,其实对应 手册寄存器Control 1 register (CTRL1)中的:PRESDIV(31-24)
原来手册中是这么讲的:
Prescaler Division Factor
This 8-bit field defines the ratio between the PE clock frequency and the Serial Clock (Sclock) frequency.
The Sclock period defines the time quantum of the CAN protocol. For the reset value, the Sclock
frequency is equal to the PE clock frequency. The Maximum value of this field is 0xFF, that gives a
minimum Sclock frequency equal to the PE clock frequency divided by 256. See Section "Protocol
Timing". This field can be written only in Freeze mode because it is blocked by hardware in other modes.
Sclock frequency = PE clock frequency / (PRESDIV + 1)
预分频器分频系数。
这8 位用来定义PE 时钟频率与串行时钟频率(Sclock)之间的比率。
Sclock 周期定义了CAN 协议的最小时间份额,对于复位之后的值,Sclock 频率等于PE
的时钟频率。该寄存器的最大值为0xFF,位Sclock 的最小时钟频率,等于PE 时钟频率
除以256 的值。该字段只能在冻结模式下写入,在其他模式下该位被硬件锁定。
给出了计算公式,如下:
Sclock frequency = PE clock frequency / (PRESDIV + 1)
这里 有三个 参数 ,其中 PE clock frequency 是确定的,即 8M, 其中参数 PRESDIV 是我们配置寄存器的值,参数Sclock frequency 即串行时钟频率不知道怎么确定!
|
|