SAE J1583: Controller Area Network (CAN) Protocol – An In-Depth Technical Overview

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.

Overview and Key Features

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:

  • Distributed real-time control with deterministic message prioritization.
  • Multi-master bus access based on Carrier Sense Multiple Access with Collision Detection (CSMA/CD) and non-destructive bitwise arbitration.
  • Support for high-speed networks (greater than 125 kbit/s) and low-speed multiplex wiring (10 kbit/s or less).
  • Robust error detection and confinement through bit monitoring, stuffing checks, CRC, and acknowledgement.

🛠️ 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.

🔍 Core Principle: CAN’s non-destructive arbitration relies on the wired-AND logic of the bus. A dominant bit (logic 0) overwrites a recessive bit (logic 1). During arbitration, transmitters output their identifier bits and monitor the bus; if a node sends a recessive bit but sees a dominant, it loses arbitration and stops transmitting, allowing higher-priority messages to proceed without delay.

CAN Architecture and Message Framing

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.

⚠️ Common Implementation Pitfall: Incorrect bit stuffing logic can lead to synchronization loss or errors. Ensure that both the transmitter stuffing and receiver de-stuffing algorithms strictly follow the five-bit rule. Also, note that the CRC field and the acknowledgement slot are subject to stuffing except during fixed-form bits.

Error Detection and Fault Confinement

CAN provides five complementary error detection mechanisms:

  • Bit Error: A transmitter monitors the bus and compares sent bits with actual bus levels. Mismatches (except during arbitration) indicate a bit error.
  • Stuff Error: Detection of six consecutive identical bits (violation of the stuffing rule).
  • CRC Error: A 15-bit CRC polynomial is computed by the transmitter and checked by receivers. Corrupted frames are rejected.
  • Form Error: A violation of the fixed-bit format of the frame (e.g., recessive bits expected but dominant seen).
  • ACK Error: If no node acknowledges a valid frame, the transmitter detects a recessive ACK slot.

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.


Frequently Asked Questions (FAQs)

How does CAN arbitration work and determine message priority?

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.

What is the purpose of bit stuffing in CAN?

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.

What are the different types of CAN frames and when are they used?

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.

How does CAN ensure data integrity through error confinement?

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.

Leave a Reply

Your email address will not be published. Required fields are marked *