CAN bus: Difference between revisions

Line 32: Line 32:
* 11-bit base identifier, common to CAN-2.0A and B.
* 11-bit base identifier, common to CAN-2.0A and B.
** All transmitting ECUs must be listening during this field, and MUST cease transmitting if preempted by a dominant signal
** All transmitting ECUs must be listening during this field, and MUST cease transmitting if preempted by a dominant signal
* RTR bit. Remote Transmission Requests (recessive) expect a response.
* RTR bit. Remote Transmission Requests (recessive) expect a response.
** Much more common are Data Frames (dominant), which carry payloads and expect no response
** Much more common are Data Frames (dominant), which carry payloads and expect no response
** Note that Data Frames will win arbitration against Remote Frames having the same ID
** If the subsequent Identifier Extension Bit is recessive, indicating 29-bit identifiers, this bit MUST be recessive, and the true RTR follows the extended identifier
** In this case, this bit is known as the "Substitute Remote Request" (SRR) bit
* IDE bit. Identifier Extension. Recessive if and only if an 18-bit extended identifier is to be provided, in which case:
** 18-bit extended identifier, combining to make a 29-bit arbitrating ID
** Real RTR bit
** A dominant reserved bit (must accept but not transmit recessive)
After the identifier (whether 11-bit or 29-bit) has been transmitted, it is only possible for one ECU to be transmitting in a compliant network (i.e., where all ECUs have distinct IDs). After this point, the two frame formats are unified:
* A dominant reserved bit
* 4-bit DLC. Data Length Code, specifying a number of data bytes 0--8.
** Larger values (9--15) can appear, but are not used in ISO CAN.
* 0--8 byte Data Field (Data Frames only)
* 15-bit CRC
* A recessive reserved bit (CRC delimiter)
* 1-bit ACK slot
* A recessive reserved bit (ACK delimiter)
* 7 recessive reserved bits (Frame delimiter)