Lukali
Lukali

Reputation: 343

(CAN) What is an RTR and SRR bit?

Is RTR and SRR an abbreviation?

I understand that both are bits, but I am confused as to what role RTR plays when we have no 29-bit identifiers in the system, as I believe just the identifier would be sufficient to send messages. Or does CAN automatically assume we would have different identifier lengths in a system, and the SRR bits and RTR bit only matter then?

Upvotes: 1

Views: 17683

Answers (1)

Lundin
Lundin

Reputation: 213711

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

Upvotes: 5

Related Questions