embedded - (CAN) 什么是 RTR 和 SRR 位?
问题描述
RTR 和 SRR 是缩写吗?
我知道两者都是位,但是当我们在系统中没有 29 位标识符时,我对 RTR 扮演的角色感到困惑,因为我相信只有标识符就足以发送消息。还是 CAN 会自动假设我们在系统中会有不同的标识符长度,而 SRR 位和 RTR 位才重要?
解决方案
RTR is used for remote request frames. It is a feature that allows you to send an empty package, requesting data of the same identifier as you used for the RTR frame. This feature has nothing to do with identifier lengths in itself.
The bit that determines if 11 or 29 bit identifiers are used is a different one called IDE. IDE=0 gives 11 and IDE=1 gives 29.
Regarding RTR versus SRR:
For 11 bit identifier, the bit following after the 11-bit identifier is called RTR.
For 29 bit identifier, the bit following after the 11 most significant bits of the identifier changes name to SRR, meaning "substitute remote request". It is always set to one (recessive). Then follows IDE + the rest of the identifier, and after that, RTR.
This design means that a 11 bit identifier frame will always win arbitration over a 29 bit identifier frame with same binary pattern in the 11 msb, regardless of RTR status of the 29 bit frame.
(Keep in mind that CAN frames are always big endian, msb first.)
It was made this way in the old Bosch spec "CAN2.0B", for backwards compatibility with "CAN2.0A".
推荐阅读
- r - 在 R 中使用 plotly 创建具有不同形状的箱点的箱线图
- python - 熊猫,如何添加具有平均分组列的行
- node.js - Nodejs Lamba,如何异步执行块的某些部分并尽早返回api回调?
- php - 数组索引的PHP对象键值比较
- android - 未处理的异常:MissingPluginException(在通道 * 上找不到方法 getBatteryLevel 的实现)与 flutter1.12
- python - pubsub 到 bigquery 没有使用 python 的数据流
- java - 静态和非静态方法的同步
- laravel - Composer 更新挂起,但 composer install 正在运行
- mongodb - 如何根据mongodb中的2个字段计算时间差
- maven - 从 AEM 6.4 中删除项目