首页 > 解决方案 > (CAN) 什么是 RTR 和 SRR 位?

问题描述

RTR 和 SRR 是缩写吗?

我知道两者都是位,但是当我们在系统中没有 29 位标识符时,我对 RTR 扮演的角色感到困惑,因为我相信只有标识符就足以发送消息。还是 CAN 会自动假设我们在系统中会有不同的标识符长度,而 SRR 位和 RTR 位才重要?

标签: embeddedcan-bus

解决方案


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".


推荐阅读