Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
The Controller Area Network (CAN) protocol, standardized in SAE J1583, remains a foundational technology for in-vehicle serial communication. Designed for distributed real-time control, CAN efficiently supports data rates from less than 10 kbit/s up to over 125 kbit/s with a high level of security. This article provides a technical breakdown of its key features, architecture, and error handling mechanisms.
CAN is an advanced serial communication protocol that enables reliable data exchange between electronic control units (ECUs) in automotive and industrial systems. Its key features include:
🛠️ Design Insight: The bus access mechanism uses a unique arbitration scheme where messages with higher priority (lower identifier value) always win access. This ensures that latency-critical signals are never blocked by lower-priority traffic, making CAN ideal for real-time control applications.
The CAN protocol defines five distinct frame types:
| Frame Type | Purpose | Key Characteristics |
|---|---|---|
| Data Frame | Transfers actual data from a transmitter to one or more receivers. | Includes arbitration field (identifier), control field, data field (0-8 bytes), CRC field, and ACK slot. |
| Remote Frame | Requests data from another node using the same identifier. | No data field; signals that a node requires data from the identified message. |
| Error Frame | Indicates a bus error detected by any node. | Consists of an error flag (6 or 12 dominant bits) and an error delimiter (8 recessive bits). |
| Overload Frame | Signals that a node is overloaded and needs additional delays. | Similar structure to error frame but for overload conditions. |
| Interframe Space | Separates consecutive data/remote frames to allow recovery time. | Three recessive bits of intermission; nodes must detect a recessive bit after idle to start transmission. |
Bit representation uses Non-Return-to-Zero (NRZ) encoding with bit stuffing to ensure sufficient transitions for clock synchronization. After five consecutive bits of the same polarity, an opposite stuffed bit is inserted. This guarantees at least one edge per six bit times.
CAN provides five complementary error detection mechanisms:
Error confinement is achieved through two independent counters: Transmit Error Counter (TEC) and Receive Error Counter (REC). These counters increment/decrement based on errors and successful transmissions. When a counter exceeds thresholds, the node enters error-passive (listener only) or bus-off (disconnected) states. This prevents a faulty node from monopolizing the bus.
CAN arbitration uses a non-destructive bitwise arbitration scheme based on the message identifier. When multiple nodes start transmitting simultaneously, each node outputs the identifier bits and monitors the bus. A dominant bit (logic 0) overrides a recessive bit (logic 1). If a node sends a recessive bit but samples a dominant bit, it loses arbitration and immediately stops transmission. Thus, the message with the lowest identifier value has the highest priority and continues without corruption.
Bit stuffing is used to maintain clock synchronization. Since CAN uses NRZ encoding, long runs of identical bits can cause loss of synchronization. After five consecutive bits of the same polarity, the transmitter inserts an opposite stuffed bit. This ensures a signal edge occurs at least every six bit times, allowing nodes to resynchronize their sampling points.
The five frame types are: Data Frame (for sending data), Remote Frame (to request data from a node), Error Frame (to signal detected bus errors), Overload Frame (to request additional delay due to overload), and Interframe Space (to separate frames). Data and remote frames carry identifiers; error and overload frames are generated automatically by hardware.
CAN uses two hardware counters per node (Transmit Error Counter and Receive Error Counter). Successful transmissions decrease counters, while errors increase them. When a counter exceeds 127, the node becomes error-passive (can only transmit passive error flags). If the Transmit Error Counter exceeds 255, the node enters bus-off (completely disconnected from the bus). This confinement prevents a single faulty node from disrupting overall network communication.
🛠️ Engineering Design Insight: For robust system design, consider the CAN bus timing parameters carefully. The standard supports a wide range of bit rates; selecting the appropriate timing segments (SYNC_SEG, PROP_SEG, PHASE_SEG1, PHASE_SEG2) and synchronization jump width is crucial to accommodate oscillator tolerances and cable delays. Misconfiguration is a common source of intermittent communication failures.
SAE J1583 remains a seminal document for understanding CAN. Although superseded by newer revisions, its technical foundations continue to underpin modern CAN implementations in automotive, industrial, and aerospace systems.