What Is CAN Protocol?
Controller Area Network (CAN) is a serial communication protocol that allows electronic control units (ECUs) to exchange information over a shared communication network. It was developed for applications in which several controllers need reliable communication without requiring a separate pair of wires between every sender and receiver.
A vehicle may contain an engine controller, transmission controller, anti-lock braking system (ABS), body controller, instrument cluster, battery management system and many other modules. These controllers often need information produced by other modules. CAN provides a common communication bus through which they can publish and receive messages.
The central idea is that a CAN frame is identified by its message identifier, not by the address of one particular receiving ECU. Nodes connected to the network can observe frames and decide which messages are relevant to them.
This article develops the subject in a practical order: why CAN is used, how nodes connect, how bits are represented, how a frame is structured, how arbitration works, and how CAN detects and confines errors.
1. Why is CAN used in vehicles?
Consider a vehicle with five controllers:
- Engine Control Module (ECM)
- Transmission Control Module (TCM)
- Anti-lock Braking System (ABS)
- Instrument Cluster
- Body Control Module (BCM)
The instrument cluster may need vehicle speed from the ABS, engine speed from the ECM and gear information from the TCM. If each controller had to be wired directly to every controller that needed its information, the wiring harness would become complicated and heavy.
With CAN, a controller can publish a message on the shared bus. Other controllers receive the frame and use it if the identifier and data are relevant to them.
Example: publishing vehicle speed
- The ABS controller measures wheel speeds and calculates vehicle speed.
- It transmits a CAN frame using the identifier assigned to the vehicle-speed message.
- The instrument cluster and other interested nodes observe the frame.
- Each receiving node checks the identifier and processes the data according to its network configuration.
The ABS does not need to transmit a separate copy for each receiver. This is one reason CAN is described as a multi-node, message-oriented network.
2. CAN network architecture
A conventional high-speed CAN network uses a two-wire differential bus. The two signal conductors are called CAN_H and CAN_L. ECUs connect to the same bus, and the main bus is normally terminated at its two physical ends.
A CAN node commonly contains three functional parts:
- Application or control logic: decides what information to transmit and how received information is used.
- CAN controller: handles frame formatting, arbitration, bit timing, acknowledgement and protocol error processing.
- CAN transceiver: converts controller-side logic signals into differential bus signals and converts received bus levels back into logic signals.
The CAN controller and transceiver are separate functions, although a microcontroller may integrate the CAN controller.
3. How are bits represented on a CAN bus?
High-speed CAN uses differential signalling. A receiver evaluates the voltage difference between CAN_H and CAN_L rather than depending only on the voltage of one conductor.
Two logical bus states are fundamental:
| Bus state | Logical value | Behaviour |
|---|---|---|
| Dominant | 0 | Overrides a recessive state |
| Recessive | 1 | Bus is released; it is observed when no node drives dominant |
In a typical high-speed CAN implementation, the recessive state has CAN_H and CAN_L at approximately the same voltage. The dominant state creates a positive differential voltage between the lines. Exact electrical levels and limits depend on the transceiver and applicable physical-layer requirements.
The dominant/recessive relationship makes CAN arbitration possible. If one node transmits recessive while another transmits dominant at the same bit time, the bus is dominant.
4. CAN identifiers and frame formats
CAN is message-oriented. A frame carries an identifier that represents the message's meaning and priority within the network design. It is not normally the physical address of a receiving ECU.
Two common Classical CAN identifier formats are:
| Format | Identifier length | Identifier range |
|---|---|---|
| Standard | 11 bits | 0x000 to 0x7FF |
| Extended | 29 bits | 0x00000000 to 0x1FFFFFFF |
The identifier participates in arbitration. Under the same arbitration format and conditions, a numerically lower identifier has higher priority because its bit pattern wins at the first differing arbitration bit.
Classical CAN data frame
A Classical CAN data frame contains several fields. This diagram is a teaching overview, not a bit-accurate drawing of every format-specific control bit.
The principal fields are:
- SOF (Start of Frame): a dominant bit marking the beginning of a frame.
- Arbitration field: contains the identifier and related arbitration bits.
- Control field: includes control information and the data length code (DLC).
- Data field: carries zero to eight data bytes in Classical CAN.
- CRC field: carries the cyclic redundancy check used for error detection.
- ACK field: provides a slot in which at least one correctly receiving node can acknowledge the frame.
- EOF (End of Frame): marks the end of the frame.
A remote frame requests data using an identifier and does not carry a data field. Error and overload frames have different purposes and are not ordinary application data frames.
5. How does CAN arbitration work?
Several ECUs may attempt to transmit when the bus is idle. CAN resolves this competition bit by bit during the arbitration field.
Because dominant is logical 0 and recessive is logical 1, a node transmitting recessive but observing dominant knows that another node has higher priority. It stops transmitting and becomes a receiver. The winning frame continues without being corrupted by a collision.
Worked example
Suppose two nodes begin transmitting standard identifiers at the same time:
- Node A:
0x100=00100000000(11-bit representation) - Node B:
0x120=00100100000(11-bit representation)
They match through the first four bits. At the next differing bit, Node A transmits dominant 0 while Node B transmits recessive 1. The bus is dominant, so Node B detects that it lost arbitration and withdraws. Node A continues.
This is called non-destructive arbitration because the winning node's frame remains valid. The losing node can try again when the bus becomes available.
Priority has an important system-design consequence. High-priority messages can gain access sooner, but a poorly planned network can delay low-priority messages. Identifiers, message periods and expected bus load therefore need to be considered together.
6. Bit timing and synchronisation
CAN nodes must use compatible nominal bit rates and timing configurations. A CAN bit is divided into time segments that help the controller synchronise to edges and sample the bus:
- Sync_Seg: the segment used for synchronisation.
- Prop_Seg: compensates for propagation delay through the network.
- Phase_Seg1 and Phase_Seg2: provide timing adjustment around the sample point.
- SJW (Synchronization Jump Width): limits the amount of timing adjustment made during resynchronisation.
The receiver samples the bus at its configured sample point. The sample point is not necessarily at the exact middle of a bit; its location depends on the network design, clock, cable length and transceiver delays.
CAN also uses bit stuffing in specified frame regions. After five consecutive bits of the same polarity, the transmitter inserts a complementary stuff bit. The receiver removes it. This provides transitions that assist synchronisation and helps detect violations of the stuffing rule.
Do not confuse configured bit rate with the number of application messages per second. A bus carries frame overhead as well as data, and actual throughput depends on frame lengths, bit stuffing, priorities and bus load.
7. What does the ACK bit mean?
During the ACK slot, the transmitter sends recessive. A receiver that has correctly received the frame up to the acknowledgement point can drive the bus dominant in that slot.
This tells the transmitter that at least one node acknowledged the frame. It does not prove that a particular intended application ECU received the message, accepted its data or acted on it. CAN acknowledgement is a link-layer indication, not an application-level confirmation.
8. Error detection and fault confinement
CAN includes several mechanisms for detecting communication errors:
- Bit monitoring: a transmitter compares the bus level with the bit it expects to observe, subject to defined exceptions such as arbitration and acknowledgement.
- Bit stuffing check: detects violations of the stuffing rule.
- Frame check: checks fixed-format fields and frame structure.
- CRC check: checks the received frame's cyclic redundancy check.
- ACK check: detects when a transmitted frame receives no acknowledgement.
When a node detects an error, it can transmit an error flag. The frame is treated as invalid and may be retransmitted according to CAN rules.
CAN also maintains transmit and receive error counters. These counters help isolate nodes that repeatedly experience errors. The broad error states are:
| State | General behaviour |
|---|---|
| Error-active | The node participates normally and can signal errors using an active error flag. |
| Error-passive | The node can communicate, but signals errors in a more restricted way. |
| Bus-off | The node is prevented from participating in bus communication after its transmit error counter crosses the bus-off threshold. |
These mechanisms are known as fault confinement. They help prevent a persistently faulty node from continuously disrupting the network. Recovery from bus-off depends on the controller implementation and the system's configured recovery policy.
9. Why are two 120-ohm termination resistors used?
A high-speed CAN bus is a transmission line. When a signal reaches an unterminated end, part of its energy can reflect back along the cable. Reflections can distort signal edges and cause communication problems, particularly as bit rates increase or wiring becomes longer.
A common high-speed CAN arrangement uses one 120 Ω termination resistor at each physical end of the main bus. The two resistors are in parallel as seen from the bus, so a powered-down network measured between CAN_H and CAN_L often reads close to 60 Ω.
That measurement is a useful diagnostic clue, not a universal pass/fail rule for every topology. The network must be checked against its design, and measurements can be affected by connected equipment and termination arrangements. Do not add a third termination simply because another ECU is physically far away; termination belongs at the two ends of the bus.
10. Practical example: decoding a vehicle-speed signal
Assume an ABS ECU publishes vehicle speed in a CAN message. The network database defines the message identifier, cycle time, signal position, byte order, scaling and offset.
For this illustrative signal definition:
- Signal name:
VehicleSpeed - Raw value:
250 - Resolution:
0.1 km/h per bit - Offset:
0 km/h
The physical value is:
[ \text = (250 \times 0.1) + 0 = 25.0\ \text ]
The receiving instrument cluster extracts the relevant bits from the data bytes, applies the scaling and offset defined by the network database, and displays the resulting speed.
The CAN frame itself does not inherently know that those bits mean vehicle speed. That meaning comes from the network's agreed signal definition, often described in a DBC file.
11. Classical CAN, CAN FD and CAN XL
CAN has evolved to support different application requirements. This is a high-level comparison; detailed capabilities and compatibility depend on the applicable protocol version and implementation.
| Feature | Classical CAN | CAN FD | CAN XL |
|---|---|---|---|
| Maximum payload per frame | 8 bytes | 64 bytes | Up to 2048 bytes |
| Data-phase bit rate | One nominal bit rate | Can switch to a faster data phase when configured | Supports a higher-speed data phase |
| Typical role | Established in-vehicle control networks | More payload and throughput while retaining CAN-based communication | Applications needing much larger payloads and higher data rates |
A CAN FD-capable controller and network must be designed for FD operation. A Classical CAN-only node may not correctly handle FD frames. Compatibility must be considered when mixing node capabilities on a network.
12. Common misconceptions
“The CAN identifier is the ECU address.”
Not usually. It identifies a message and its priority. Multiple ECUs may receive the same frame.
“The ECU with the lowest identifier always owns the bus.”
It wins arbitration when it competes at the same time with other transmitters and its frame wins the arbitration comparison. It does not permanently own the bus.
“An ACK means the intended ECU processed the message.”
No. It means at least one node acknowledged the frame at the CAN link layer.
“CAN_H is always high and CAN_L is always low.”
No. Their voltage relationship changes with the bus state. CAN uses the differential voltage.
“A 60 Ω resistance reading proves the complete network is healthy.”
No. It is one useful check. It does not prove signal quality, wiring integrity under operation, correct bit timing or application-level communication.
13. Key takeaways
- CAN is a multi-node, message-oriented serial communication protocol.
- ECUs share a differential two-wire bus in common high-speed CAN networks.
- Dominant represents logical 0 and recessive represents logical 1.
- CAN arbitration is bitwise and non-destructive; lower numerical identifiers have higher priority under the same arbitration format.
- Classical CAN carries up to eight data bytes per data frame.
- CRC, bit monitoring, frame checks and other mechanisms help detect errors.
- Error-active, error-passive and bus-off states support fault confinement.
- Correct topology, termination, bit timing and network database definitions are essential for reliable communication.
14. Check your understanding
- Why can multiple ECUs receive the same CAN frame?
- What happens when a node transmits recessive but observes dominant during arbitration?
- Does an ACK guarantee that the intended application ECU processed the message?
- Why are termination resistors placed at the two physical ends of a high-speed CAN bus?
- What is the difference between error-passive and bus-off?
Answers
- CAN is message-oriented; all connected nodes can observe the bus and filter messages by identifier.
- It loses arbitration and stops transmitting, allowing the higher-priority frame to continue.
- No. ACK only indicates that at least one node acknowledged the frame at the link layer.
- To reduce signal reflections at the ends of the transmission line.
- An error-passive node can still communicate with restrictions; a bus-off node is prevented from participating in bus communication.
Editorial note: This is original educational material prepared for Autorise Education. It explains general CAN concepts. For implementation work, verify electrical limits, timing rules and protocol behaviour against the applicable CAN specifications, transceiver data sheets and vehicle network design documents.
