Sitemap
Sneha Mallapur

Sneha Mallapur

Controller Area Network (CAN)

6 min readOct 22, 2025

--

Modern vehicles consist of over 70 Electronic Control Units (ECU) comprising of the Power-train Control Module (PCM), Brake Control Module (BCM), Navigation ECU, etc. These ECUs are usually located near the passenger side, behind the dashboard under the airbags.

Communication Protocols used in vehicles
Different communication protocols in a car

Different types of communication is required based on the type of ECU. One such communication protocol used is the Controller Area Network protocol. CAN protocol was developed by Bosch in 1986 as a network to connect independent controllers.

Important features of CAN Protocol

  1. Low speed CAN controllers can handle speeds up to 125kbit/s.
  2. High speed CAN controllers can handle speeds up to 1Mbit/s.
  3. Two wire half-duplex, high speed serial network technology.
  4. Message based protocol.
  5. Event driven protocol but does not guarantee message delivery time.
  6. Up to 8 Bytes of data can be transmitted.
  7. All ECUs or nodes share the same physical communication bus instead of a mesh topology.
  8. Carrier Sense Multiple Access with Collision Detection (CSMA/CD) is a method of message collision avoidance to ensure safe data transfer and avoid delays caused due to the collision. (A collision occurs when two or more nodes are attempting to access the bus at the same time.)
  9. Non-destructive bus arbitration with the help of the “Message Identifier” field or simply the ID field in the CAN Message Frame. Low message ID represents a high priority.
Press enter or click to view image in full size
Press enter or click to view image in full size
CAN Topology

CAN Frame Format

CAN Frame Format
  1. SOF (1 bit) — Start of Frame. Indicates the start of the message frame. The SOF bit is usually a dominant 0 to communicate to other nodes that the CAN node intends to talk.
  2. ID (11 bit/29 bit) — Frame Identifier. It decides the priority of the message. CAN 2.0A has 11 bit identifier whereas CAN 2.0B has a 29 bit (11+18) identifier.
  3. RTR (1 bit) — Remote Transmission Request. Indicates whether the node sends data or requests dedicated data from another node. It is a dominant 0 when information is required from another node. Each node receives the request but the node whose identifier matches that of the message is the required node.
  4. Control (6 bit)- This consists of the Identifier Extension Bit (IDE) which is a dominant 0 for 11 bit Identifier and recessive 1 for 29 bit Identifier. It also contains the 4 bit Data Length Code (DLC) that specifies the length of the data bytes transmitted. It also consists of a 1 bit reserved bit (R0).
  5. Data — Data to be transmitted, also called the payload is stored here and can be a maximum of 8 bytes.
  6. CRC (16 bit) — Cyclic Redundancy Check. It is used to ensure data integrity and contains the checksum of the data transmitted for error detection.
  7. ACK (2 bit) — Acknowledge bit. It is used to check if the message is correctl received and transmuted. It is a dominant 0 if the accurate message is received.
  8. EOF (7 bit) — End of Frame bit. This signifies the end of the message and gives the controller time to move a correctly received frame into it’s proper position.
  9. ITM (3 bits) — Intermission bit. This gives the controller or bus time to be idle. The CAN nodes recognize that the bus is idle when it detects 11 recessive bits that is 1 ACK bit + 7 EOF bit + 3 ITM bit.

CAN Physical Encoding

The CAN protocol has two logical states namely dominant and recessive. The differential voltage within the bus is used to differentiate between the two states. The recessive state is represented by a ‘1’ and the dominant state is represented by a ‘0’. They are also denoted with CAN_H and CAN_L and the voltage levels relative to each other decide the transmission of a 1 or 0. This is differential signalling. The current flowing in each signal line is equal in direction but opposite, resulting in a field-canceling effect that is a key to low noise emissions.This ensures a balanced differential signalling that decreases noise coupling and permits a high transmission rate over the wires.

Get Sneha Mallapur’s stories in your inbox

Join Medium for free to get updates from this writer.

The CAN Physical Layer is used to achieve better design transparency and implementation flexibility.

CAN Logical States

Standard and Extended CAN Format

The CAN protocol was extended by the introduction of 29 but ID. This is usually used in heavy duty vehicles where the Identifier size goes to 29 bit. This is categorized as CAN 2.0B. The CAN protocols with 11 bit ID are called CAN 2.0A. As the two formats have to coexist on one bus, it is laid down to which message has higher priority on the bus in the case of bus access collisions with differing formats and the same base identifier.

  1. CAN 2.0A : CAN controllers which support extended format also can send and receive messaged in the standard format of 11 bit. When the CAN controller cannot send 29 bit formats then it is called a CAN 2.0A and they are used only in one network, only then these messages can be transmitted. If the standard CAN controller finds extended CAN messages then the controller ignores and discards these messages. The distinction between standard format and extended format is made using the IDE bit (Identifier Extension Bit) which is transmitted as dominant in the case of a frame in standard format.
  2. CAN 2.0B : CAN controllers that support extended format as well as standard format messages are CAN 2.0B. The distinction between standard format and extended format is made using the IDE bit (Identifier Extension Bit) which is transmitted as recessive in the case of a frame in extended format. Here, the ID bit is followed by an extended format which is a 18 bit ID extension. Giving a total of 29 bit Identifier in the message format.
Press enter or click to view image in full size
CAN 2.0A and CAN 2.0B

CAN Fault Confinement

Error Detection is a very important feature for any system and it increases how robust a system can be made. CAN protocol offers CRC checks for each message that is sent but for detecting any faulty nodes CAN uses fault confinement. This detects the faulty units and places them in passive or off states, this ensures that the bus output and state is not affected. There are 3 states that can be assigned to any given node :

  • Error active units in this state are assumed to function properly. Units can transmit on the bus and signal errors with an ACTIVE ERROR FLAG.
  • Error passive units are suspected of faulty behavior (in transmission or reception). They can still transmit on the bus, but their error signalling capability is restricted to the transmission of a PASSIVE ERROR FLAG.
  • Bus off units are very likely corrupted and cannot have any influence on the bus. (e.g. their output drivers are switched off.)

Units change their state according to the value of two integer counters: TRANSMIT ERROR COUNT and RECEIVE ERROR COUNT, which give a measure of the likelihood of a faulty behavior on transmission and reception, respectively.

CAN Fault Confinement

Conclusion

CAN protocol reduces wiring and provides the ability to work in different electrical environments and ensures noise-free transmission. Traffic congestion is eliminated as the messages are transmitted based on their priority and it allows the entire network to meet the timing constraints. It provides for error-free transmission as each node can check for errors during the transmission of the message and send the error frame. But, CAN is not as reliable as Flexray.

In the future, CAN protocol can be connected to the internet and make it IoT enabled. Furthermore, Vehicle to Vehicle communication can be enabled.

--

--