Controller Area Network (CAN) Bus Errors

Last modified by Microchip on 2026/03/26 15:04

Introduction

Control Area Network (CAN) Graphic

The Controller Area Network (CAN) protocol is designed to provide reliable and robust communication in automotive and embedded systems, even in electrically noisy environments. One of the key reasons for its reliability is the comprehensive set of error detection mechanisms built into the protocol. These mechanisms ensure that any corruption or miscommunication on the bus is quickly identified and addressed, maintaining the integrity of data exchanged between devices.

Types

CAN employs five primary methods for detecting errors during message transmission. Let’s review them.

CRC Error

Control Area Network (CAN) Cyclical Redundancy Check (CRC) Field

The first is the Cyclic Redundancy Check (CRC) error. Each CAN message includes a CRC field, which, in classical CAN, is a 15-bit value calculated from the message content. When a node receives a message, it recalculates the CRC and compares it to the value in the message. If the two values do not match, a CRC error is detected, indicating that the message may have been corrupted during transmission.

ACK Error

Control Area Network (CAN) Acknowledge (ACK) Field

The second method is the acknowledge error (ACK error). After a message is transmitted, the transmitting node expects to see a dominant bit (logical 0) in the ACK slot bit of the frame. This dominant bit is sent by any node that has successfully received the message. If the transmitter does not detect this dominant bit, it means that no node acknowledged the message, resulting in an ACK error.

Form Error

Control Area Network (CAN) Delimiters

Form errors are the third type of error detected by CAN. Certain parts of a CAN frame, such as the CRC delimiter, ACK delimiter, End of Frame, and interframe space, are required by the protocol to be recessive bits (logical 1). If a dominant bit (logical 0) is detected in any of these fixed fields, a form error is flagged. This helps ensure that the structure of each CAN frame remains consistent and recognizable to all nodes.

Stuff Error

Control Area Network (CAN) Data Frame

The fourth error detection method is the stuff error. CAN uses a technique called bit stuffing to maintain synchronization between nodes. After five consecutive bits of the same value (either all dominant or all recessive), the transmitter must insert a complementary bit. If a receiver detects six consecutive bits of the same polarity between the Start of Frame (SOF) and the CRC delimiter, it indicates a violation of the bit stuffing rule, resulting in a stuff error.

Bit Error

Control Area Network (CAN) Data Frame

The fifth and final method is the bit error. During transmission, each node monitors the bus to ensure that the bit value it sends matches what is actually present on the bus. If a node transmits a dominant bit but detects a recessive bit, or vice versa, a bit error is detected. There are exceptions to this rule during the arbitration process and in the ACK slot bit, where such discrepancies are expected and do not constitute errors.

When any of these errors are detected, the CAN protocol responds by generating an error frame. This frame alerts all nodes on the network that an error has occurred. The original message is then typically retransmitted, ensuring that data is not lost due to transient faults or noise.

Question iconQuestion: In a real-world scenario, due to a hardware fault, CANL and CANH lines were shorted. The logic analyzer shows a series of consecutive dominant bits on the bus. What type of CAN error is most likely observed here? 

  • Stuff error
  • Form error
  • Bit error
  • Ack error

Answer: A
 

Back to Top