Electronics Guide

Controller Area Network

Controller Area Network (CAN) is a robust serial communication protocol originally developed by Bosch in the 1980s for automotive applications. Bosch presented the concept publicly in 1986 and released the CAN 2.0 specification in 1991; the protocol was subsequently standardized internationally as the ISO 11898 series. Designed to enable reliable communication between electronic control units (ECUs) in vehicles without a host computer, CAN has become the dominant communication standard in automotive systems and has found widespread adoption in industrial automation, medical devices, and other demanding applications.

The protocol's success stems from its combination of real-time capability, fault tolerance, and prioritized message handling. CAN networks operate reliably in electrically noisy environments, making them well suited to applications where electromagnetic interference is a significant concern. Three generations now coexist: Classical CAN, CAN FD (Flexible Data-rate), and CAN XL, the last two added to ISO 11898-1 in its 2015 and 2024 editions respectively.

This article explores the fundamental concepts, physical and data link layer specifications, bit timing, error management, and higher-layer protocols that make CAN an essential technology for embedded systems engineers.

Protocol Overview

CAN is a multi-master, broadcast serial bus that uses differential signaling for noise immunity. Unlike traditional serial protocols with explicit addressing, CAN uses message identifiers that indicate the content and priority of messages rather than their destination. All nodes on a CAN bus receive all messages, and each node decides independently whether to process a received message.

Classical CAN supports bit rates up to 1 Mbit/s. Because arbitration requires a bit to propagate to the far end of the bus and back within one bit time, the maximum bus length falls as the bit rate rises. Widely used planning figures are roughly 40 meters at 1 Mbit/s, 100 meters at 500 kbit/s, 250 meters at 250 kbit/s, and 500 meters at 125 kbit/s. Passenger-car powertrain and chassis buses typically run at 500 kbit/s; body and comfort buses often run at 125 kbit/s; heavy-duty vehicles traditionally run at 250 kbit/s.

Key characteristics of CAN include:

  • Multi-master architecture: Any node can initiate transmission when the bus is idle
  • Message-based communication: Identifiers describe message content, not source or destination
  • Non-destructive arbitration: Priority-based bus access without message loss
  • Automatic error handling: Built-in error detection and fault confinement
  • Broadcast capability: All nodes receive all messages simultaneously
  • Data consistency: A frame is accepted by every node or by none, because error signaling is globalized across the bus

Two identifier lengths are defined. CAN 2.0A, or the base frame format, uses an 11-bit identifier, allowing 2,048 distinct values. CAN 2.0B, the extended frame format, uses a 29-bit identifier. Controllers described as "2.0B active" transmit and receive extended frames; "2.0B passive" controllers ignore extended frames without treating them as errors.

Protocol Layers

The CAN protocol architecture follows a layered model that separates physical signaling from data handling. Understanding these layers is essential for both hardware design and software implementation.

Physical Layer

The CAN physical layer defines the electrical characteristics of the bus, including voltage levels, timing, and cable specifications. CAN uses differential signaling on a two-wire bus (CAN_H and CAN_L) to achieve excellent noise immunity.

The bus has two logical states: dominant (logic 0) and recessive (logic 1). When any node drives the bus dominant, it overrides recessive states from other nodes. This property enables non-destructive arbitration and acknowledgment.

Common physical layer standards include:

  • ISO 11898-2: High-speed CAN with a terminated, linear bus topology. The 2016 edition absorbed the former ISO 11898-5 (low-power mode) and ISO 11898-6 (selective wake-up) so that a single part covers all high-speed medium access units. The 2024 edition adds signal improvement capability (SIC) transceivers for CAN FD and CAN XL.
  • ISO 11898-3: Low-speed fault-tolerant CAN, up to 125 kbit/s, able to keep communicating over a single wire if the other conductor shorts or opens. Once common in body electronics, it is largely legacy in new designs.
  • SAE J2411: Single-wire CAN (SWC/GMLAN), typically 33.3 kbit/s, used for low-cost body functions such as mirrors and seat controls.

High-speed CAN requires 120-ohm termination resistors at each end of the bus to prevent signal reflections; a healthy idle bus therefore measures about 60 ohms between CAN_H and CAN_L. In the dominant state the transceiver drives CAN_H toward roughly 3.5 V and CAN_L toward roughly 1.5 V, a nominal differential of about 2 V. In the recessive state both lines relax toward the common-mode level, near 2.5 V, giving a differential near zero. Receivers interpret a differential above about 0.9 V as dominant and below about 0.5 V as recessive, which leaves substantial noise margin.

Because a recessive bus is passively driven only by the termination network, CAN behaves as a wired-AND: any single node asserting dominant wins. This one electrical property underpins both arbitration and acknowledgment.

Conventional transceivers allow ringing to persist after the driver releases the bus to recessive, which limits the data-phase bit rate in branched topologies. CAN SIC transceivers, first specified in CiA 601-4 and later folded into ISO 11898-2:2024, actively damp that ringing and tighten bit-timing symmetry, allowing reliable CAN FD data phases at 5 Mbit/s and up to 8 Mbit/s in topologies that would otherwise be restricted to 2 Mbit/s.

Data Link Layer

The data link layer handles message framing, arbitration, error detection, and acknowledgment. This layer is typically implemented in hardware within CAN controller chips.

CAN defines several frame types:

  • Data frame: Carries up to 8 bytes of data (64 bytes in CAN FD, 2,048 bytes in CAN XL)
  • Remote frame: Requests data from another node. Remote frames exist only in Classical CAN; CAN FD and CAN XL removed them.
  • Error frame: Signals detected errors to all nodes
  • Overload frame: Requests extra delay between frames

A base-format data frame consists of:

  • Start of Frame (SOF): A single dominant bit marking frame start
  • Arbitration field: 11-bit identifier plus the RTR bit, which is dominant for data frames and recessive for remote frames. Extended frames insert the substitute remote request (SRR) and IDE bits, then 18 more identifier bits, before their own RTR bit.
  • Control field: IDE bit, a reserved bit, and a 4-bit data length code (DLC)
  • Data field: 0 to 8 bytes of payload data
  • CRC field: 15-bit cyclic redundancy check plus a recessive delimiter
  • ACK field: Acknowledgment slot and delimiter
  • End of Frame (EOF): Seven recessive bits

Frames are separated by a three-bit recessive intermission. In Classical CAN, DLC values from 9 through 15 are all interpreted as eight data bytes, so the code is not a straight byte count; CAN FD reuses those codes to select payloads of 12, 16, 20, 24, 32, 48, and 64 bytes.

Bit stuffing inflates the frame on the wire. A worst-case base-format frame carrying eight data bytes occupies about 130 bit times including stuff bits and intermission, so at 500 kbit/s it consumes roughly 260 microseconds of bus time. Designers use figures of this kind when budgeting bus load, which is commonly held below 50 to 70 percent so that low-priority messages still meet their deadlines.

Bit Timing and Synchronization

CAN transmits without a separate clock line, so every node must recover timing from the data itself. Each nominal bit time is divided into an integer number of time quanta, and those quanta are grouped into four segments: the synchronization segment, the propagation segment, phase segment 1, and phase segment 2. The bus is sampled at the boundary between phase segment 1 and phase segment 2.

The propagation segment must cover twice the worst-case signal delay around the bus, because arbitration requires a transmitted bit to reach the most distant node and its response to return before the sample point. This round-trip requirement, not attenuation, is what caps bus length at a given bit rate.

Nodes perform a hard synchronization on the falling edge at start of frame and then resynchronize on subsequent recessive-to-dominant edges by lengthening phase segment 1 or shortening phase segment 2. The permitted adjustment is bounded by the synchronization jump width (SJW). Bit stuffing guarantees an edge at least every five bits, ensuring resynchronization opportunities throughout a frame.

The sample point is expressed as a percentage of the bit time and must be configured identically, within tolerance, on every node. Automotive practice commonly places it at 80 percent for Classical CAN, while CANopen recommends 87.5 percent. A mismatch in sample point or bit rate is a frequent cause of a node that appears to transmit correctly on an oscilloscope yet is never acknowledged.

Message Arbitration

CAN's non-destructive bitwise arbitration mechanism allows multiple nodes to transmit simultaneously while ensuring the highest-priority message succeeds without data loss. This mechanism is fundamental to CAN's real-time capabilities.

When multiple nodes begin transmitting at the same time, they monitor the bus while sending their identifier bits. If a node transmits a recessive bit but reads a dominant bit, it has lost arbitration and must stop transmitting immediately. The node with the lowest identifier value (most dominant bits) wins arbitration.

This process is non-destructive because the winning message continues without interruption or corruption. Losing nodes automatically retry when the bus becomes idle. The arbitration mechanism guarantees that the highest-priority pending message is sent first, providing bounded latency for critical messages.

Two consequences follow from the bit-by-bit comparison. A data frame beats a remote frame with the same identifier, because the RTR bit is dominant for data frames. A base-format frame beats an extended-format frame whose first 11 identifier bits are identical, because the base frame's dominant RTR bit arrives where the extended frame sends its recessive SRR bit.

Priority assignment requires careful system design. Lower identifier values have higher priority, so safety-related and time-critical signals should receive the lowest identifiers. Because a low-priority frame can be delayed by every higher-priority frame that becomes ready before it, designers use response-time analysis to confirm that each message meets its deadline under worst-case queueing, including the blocking caused by one lower-priority frame already in progress.

Arbitration also imposes a limit that CAN cannot escape: identifiers must be unique to a single transmitting node. If two nodes send different payloads under the same identifier at the same instant, neither loses arbitration, both continue, and the resulting bit error corrupts the frame.

Message Filtering

CAN controllers implement hardware message filtering to reduce the software burden of processing irrelevant messages. Since all nodes receive all messages on the bus, efficient filtering is essential for system performance.

Most CAN controllers support two filtering mechanisms:

Acceptance filters define which message identifiers a node will receive. Filters typically combine identifier patterns with masks, where mask bits determine which identifier bits must match. This allows flexible configuration ranging from single-message acceptance to receiving all messages.

Receive buffers store accepted messages until software retrieves them. Controllers typically provide multiple receive buffers with different filter configurations, enabling priority-based message handling. Some controllers offer FIFO buffers for high-throughput applications.

Filter configuration significantly impacts system design. Over-filtering may cause nodes to miss important messages, while under-filtering increases processor load and interrupt frequency. Designers must analyze message flow and timing requirements to determine appropriate filter settings.

Error Handling

CAN implements sophisticated error detection and handling mechanisms that make it exceptionally reliable. The protocol can detect errors with very high probability and automatically manages faulty nodes to prevent them from disrupting network operation.

Error Detection

CAN employs five error detection mechanisms:

  • Bit monitoring: Each transmitter compares sent bits to bus values, detecting bit errors during transmission (except during arbitration)
  • Bit stuffing: After five consecutive bits of the same value, a stuff bit of opposite polarity is inserted. Receivers detect stuff errors when this rule is violated.
  • CRC check: A 15-bit CRC protects frame data. CRC errors indicate data corruption.
  • Frame check: Fixed-format frame segments must follow protocol specifications. Form errors indicate protocol violations.
  • ACK check: Transmitters check for acknowledgment from at least one receiver. ACK errors indicate that no receiver acknowledged the message.

Acting together, these mechanisms give Classical CAN a Hamming distance of 6 over the protected frame, meaning that any pattern of up to five randomly distributed bit errors is detected. The specification places the probability that a corrupted frame is accepted as valid at an extremely low level, which is why CAN is trusted in safety-related applications.

When any node detects an error, it transmits an error frame. An error-active node signals with six consecutive dominant bits, deliberately violating the stuffing rule so that every other node also registers an error and discards the frame. This globalization of errors is what preserves data consistency across the bus. The transmitter then retries automatically, typically succeeding on the next attempt if the disturbance was transient.

Automatic retransmission is not always desirable. Controllers therefore offer a single-shot or one-shot transmission mode that abandons a frame after one attempt, which time-triggered and safety-monitored designs use to prevent a stale message from being delivered late or a faulty node from monopolizing the bus.

Fault Confinement

CAN uses error counters to identify and isolate faulty nodes, preventing a single malfunctioning device from disrupting the entire network. Each node maintains separate transmit and receive error counters.

Nodes transition through three states based on error counter values:

  • Error active: Normal operation, with both counters below 128. The node signals detected errors with an active error flag of six dominant bits.
  • Error passive: Either counter has reached 128. The node still communicates but signals errors with a passive error flag of six recessive bits, which does not disturb other nodes. It must also wait an additional eight-bit suspend transmission period before starting a new frame, so it cannot dominate the bus.
  • Bus off: The transmit error counter has exceeded 255. The node switches off its output drivers and neither transmits nor acknowledges.

The counters are deliberately asymmetric. A transmit error typically adds 8 to the transmit error counter, while a receive error adds 1 to the receive error counter, so a node whose own transmissions fail is penalized far faster than one that merely observes trouble. Each successful transmission or reception decrements the corresponding counter by 1. Only the transmit error counter can drive a node bus off; a node that only ever receives corrupt traffic becomes error passive but stays on the bus.

Recovery from bus off is defined in ISO 11898-1: the node may rejoin after it has monitored 128 occurrences of 11 consecutive recessive bits, equivalent to the bus being idle for that many frame gaps. Most controllers make this recovery optional, requiring software to clear the initialization bit first, so that the application can log the fault and decide whether resuming is safe.

CAN FD

CAN FD (Flexible Data-rate) extends Classical CAN to address growing bandwidth requirements in modern vehicles and industrial systems. Introduced by Bosch in 2012 and standardized as part of ISO 11898-1:2015, CAN FD maintains backward compatibility while providing significant improvements.

Key enhancements in CAN FD include:

  • Increased payload: Data field expanded from 8 bytes to up to 64 bytes per message
  • Higher bit rates: The data phase uses bit rate switching to run faster than the arbitration phase, commonly at 2 Mbit/s with conventional transceivers and 5 to 8 Mbit/s with SIC transceivers; the arbitration phase remains at Classical CAN speeds
  • Improved CRC: A stronger CRC for better error detection (17 bits for frames carrying up to 16 data bytes, 21 bits for larger payloads)
  • Enhanced stuffing: Fixed stuff bits in the CRC field remove a corner case that could weaken error detection
  • Error state indicator: The ESI bit lets a transmitter announce that it has become error passive, giving diagnostics visibility that Classical CAN lacks

Three new control bits govern the format. The FDF bit, occupying the position of a Classical reserved bit, marks the frame as CAN FD. The BRS bit selects whether the data phase switches to the faster bit rate. The ESI bit reports the transmitter's error state. Because the RTR position is reused, CAN FD has no remote frames.

Bit rate switching begins after arbitration and ends after the CRC field, so contention is still resolved at a bit rate the whole bus can follow while the payload moves quickly. Combined with payloads up to 64 bytes, this cuts per-byte overhead sharply: a 64-byte CAN FD frame carries eight times the data of a Classical frame for far less than eight times the bus time.

Coexistence is the main migration constraint. A Classical CAN controller cannot decode a CAN FD frame and will flag it as an error, destroying the transmission. Mixed buses therefore require either Classical controllers with FD-tolerance, which ignore FD frames silently, or a segmented network with gateways. Transceivers are more forgiving: any high-speed transceiver passes CAN FD arbitration-phase signaling, but reaching high data-phase rates in a branched topology generally calls for SIC devices.

CAN XL

CAN XL is the third generation of the protocol, developed within CAN in Automation (CiA) as the CiA 610 series and standardized in the 2024 editions of ISO 11898-1 and ISO 11898-2. It targets the gap between CAN FD and Ethernet, particularly the 10BASE-T1S edge of automotive zonal architectures.

Distinguishing features include:

  • Payloads from 1 to 2,048 bytes, enough to carry a complete Ethernet frame inside a CAN XL frame
  • Data-phase bit rates of 10 to 20 Mbit/s using SIC XL transceivers, with higher rates possible when the physical layer uses PWM coding at the attachment unit interface instead of the traditional NRZ coding
  • An 11-bit priority identifier used purely for arbitration, decoupled from message content addressing
  • An 8-bit SDU type field that names the payload's content, allowing CAN XL to tunnel CAN FD frames, IP packets, or Ethernet frames
  • An 8-bit virtual CAN network identifier (VCID) that partitions one physical segment into as many as 256 logical networks
  • Split CRC protection, with a 13-bit header CRC and a 32-bit frame CRC, so a receiver can trust the header before committing buffer space to a long payload

CAN XL retains the arbitration mechanism and the error-management model that make CAN predictable, so it inherits bounded latency rather than the statistical behavior of a switched network. It also adds an optional security layer, CANsec, defined by CiA to provide authentication and encryption at the data link layer. Adoption is still early relative to CAN FD, and it requires new controllers and transceivers throughout a segment.

CANopen

CANopen is a higher-layer protocol and device profile specification built on CAN, primarily used in industrial automation, medical equipment, and other embedded applications. Developed and maintained by CAN in Automation (CiA), CANopen provides standardized communication mechanisms, device profiles, and application layer services.

Communication Objects

CANopen defines several communication object types:

  • Service Data Objects (SDO): Confirmed read/write access to device parameters using client/server model
  • Process Data Objects (PDO): Real-time data exchange without protocol overhead
  • Network Management (NMT): Device state control and network configuration
  • Emergency (EMCY): High-priority error notification
  • Synchronization (SYNC): Network-wide timing reference
  • Heartbeat and node guarding: Device presence monitoring, with heartbeat the preferred mechanism in current designs

The predefined connection set maps these objects onto 11-bit identifiers using a node ID from 1 to 127. The lower seven bits of the identifier carry the node ID and the upper four bits carry a function code, so a node's transmit PDO 1 and its SDO responses fall at fixed offsets. This convention lets a simple network come up with no identifier planning at all, while larger systems remap the identifiers explicitly through the object dictionary.

PDOs carry process data with no protocol header, so all eight bytes are payload, and their content is defined by mapping entries in the object dictionary rather than by a fixed layout. Transmission can be event-driven, cyclic, or triggered by the SYNC object, which is how CANopen coordinates sampling and actuation across a machine.

Object Dictionary

Every CANopen device contains an object dictionary, a standardized structure holding all device parameters and configuration data. The object dictionary provides a consistent interface for device configuration and diagnostics.

Object dictionary entries are addressed by 16-bit index and 8-bit subindex. Standard entries include communication parameters, manufacturer information, and device-specific data. SDO services provide read and write access to any object dictionary entry.

Device Profiles

CANopen defines standardized device profiles for common device types, ensuring interoperability between products from different manufacturers. Profiles specify required object dictionary entries, behavior, and communication patterns for device categories including:

  • CiA 401: Generic I/O modules
  • CiA 402: Drives and motion control, widely implemented in servo and stepper amplifiers
  • CiA 404: Measuring devices and closed-loop controllers
  • CiA 406: Encoders

Vendors supply an electronic data sheet (EDS) describing a device's object dictionary, which configuration tools use to generate a device configuration file (DCF) for the specific installation. CANopen FD, specified in CiA 1301, carries the same object model over CAN FD, replacing segmented SDO transfers with the far more efficient universal SDO service.

SAE J1939

SAE J1939 is a higher-layer protocol based on CAN, designed specifically for heavy-duty vehicles including trucks, buses, and construction and agricultural equipment. Developed by SAE International, J1939 defines vehicle network architecture, diagnostic services, and standardized parameter definitions. The classic physical layer runs at 250 kbit/s over a shielded twisted pair; SAE J1939-14 defines a 500 kbit/s physical layer for higher-bandwidth applications, and later parts extend the standard onto CAN FD.

Several derivative standards reuse the J1939 application layer over different physical layers or market segments. ISO 11783, known as ISOBUS, adapts it to agricultural tractors and implements. NMEA 2000 adapts it to marine electronics. FMS, the Fleet Management System standard, defines a read-only gateway that exposes a safe subset of vehicle data to telematics equipment.

Protocol Features

J1939 uses 29-bit extended CAN identifiers with a specific structure:

  • Priority (3 bits): Message priority (0 highest, 7 lowest)
  • Extended Data Page and Data Page (2 bits): Parameter group selection
  • PDU Format (8 bits): Determines addressing mode
  • PDU Specific (8 bits): Destination address or group extension
  • Source Address (8 bits): Transmitting node address

Unlike base CAN, J1939 uses source addressing, with each node having a unique 8-bit address. The protocol supports both peer-to-peer and broadcast communication. The PDU format field selects between them: values below 240 indicate PDU1, in which the PDU-specific field is a destination address, while values of 240 and above indicate PDU2, in which that field extends the parameter group number and the message is broadcast.

Addresses are not simply hard-coded. Each ECU carries a 64-bit NAME that encodes its function, manufacturer, and instance. At startup, nodes claim an address with an Address Claimed message; if two nodes claim the same address, the one with the numerically lower NAME keeps it and the other must claim a different address or fall back to the null address. This dynamic address claiming is what allows equipment from many suppliers to share a bus without a central configuration authority.

Parameter Groups

J1939 organizes data into Parameter Groups (PGs) identified by Parameter Group Numbers (PGNs). Each PG defines a specific set of Suspect Parameter Numbers (SPNs) representing individual data elements. This standardization enables interoperability between components from different manufacturers.

Common parameter groups include engine data, transmission information, vehicle speed and distance, and diagnostic messages. The J1939 Digital Annex defines thousands of standardized parameters covering virtually every vehicle function.

Transport Protocol

J1939 includes a transport protocol for messages exceeding 8 bytes, supporting payloads up to 1,785 bytes. Each segment spends one byte on a sequence number and carries seven data bytes, and a maximum of 255 segments gives the 1,785-byte ceiling. The protocol reassembles the segments at the receiver.

Two transport modes are defined:

  • Broadcast Announce Message (BAM): One-to-many transmission without acknowledgment. The sender announces the message size, then paces the segments, conventionally at 50 to 200 milliseconds apart, because receivers cannot exert flow control.
  • Connection mode: Point-to-point transmission in which the receiver returns Clear to Send messages granting a number of packets at a time, followed by an end-of-message acknowledgment

A node can maintain only one BAM session at a time, so applications that stream large data sets, such as software downloads or bulk diagnostics, generally use connection mode or the higher-throughput transport defined for the CAN FD variant of J1939.

Diagnostics

SAE J1939-73 defines the diagnostic messages, known as DM messages. DM1 broadcasts currently active diagnostic trouble codes, DM2 reports previously active codes, and DM11 clears them. Each trouble code combines a suspect parameter number identifying the affected component or signal, a failure mode identifier describing the nature of the fault, and an occurrence count.

Because the SPN and FMI vocabulary is standardized, a generic service tool can read and interpret fault information from any compliant ECU rather than requiring manufacturer-specific software. Heavy-duty on-board diagnostic regulations build on these same messages, which is why J1939 diagnostics and regulatory OBD reporting are closely intertwined in commercial vehicles.

Security Considerations

CAN was designed for reliability, not for security. The protocol has no authentication, no encryption, and no notion of a trusted sender: any node with bus access can transmit any identifier, and because arbitration favors low identifiers, an attacker can also starve legitimate traffic. Published research has repeatedly demonstrated that physical or remote access to a vehicle bus permits injection of frames that safety-critical ECUs accept as genuine.

Mitigations operate above or around the protocol rather than within Classical CAN itself:

  • Message authentication: AUTOSAR Secure Onboard Communication (SecOC) appends a truncated message authentication code and a freshness value to protected frames, defeating replay and spoofing at the cost of payload space
  • Segmentation and gateways: Separating powertrain, chassis, and infotainment onto distinct buses joined by a filtering gateway limits what a compromised domain can reach
  • Intrusion detection: Monitors that model normal message periodicity and identifier sets can flag injected or unusually timed frames
  • CANsec: The CAN XL security layer provides authentication and optional encryption natively, the first such mechanism inside the protocol family

Because payload space is scarce in Classical CAN and CAN FD, authentication is normally applied selectively to the messages whose forgery would be dangerous, not to all bus traffic.

Implementation Considerations

Successful CAN implementation requires attention to both hardware and software aspects.

Hardware Design

CAN hardware design involves selecting appropriate controllers and transceivers, designing the physical bus, and ensuring proper termination and grounding.

  • Controller selection: Most modern microcontrollers integrate one or more CAN controllers, and many now integrate CAN FD. Standalone controllers attached over SPI remain useful for adding CAN to a processor that lacks it, though the SPI transfer adds latency that matters at high bus loads.
  • Transceiver selection: Match the transceiver to the target bit rate and environment. Automotive parts add bus fault protection, load dump tolerance, and thermal shutdown; SIC devices are advisable for CAN FD data phases above 2 Mbit/s. Galvanically isolated transceivers break ground loops in industrial installations.
  • Bus topology: High-speed CAN requires a linear bus with termination at both ends. Keep stubs short, on the order of a few tens of centimeters at 500 kbit/s and shorter still at higher rates, since each stub is an unterminated transmission line that reflects energy back onto the trunk.
  • Termination: Use one 120-ohm resistor at each end of the trunk and none in between; nodes in the middle must not add termination. Split termination, in which each 120-ohm resistor is divided into two 60-ohm halves with a capacitor from the midpoint to ground, stabilizes the common-mode voltage and measurably reduces radiated emissions.
  • Grounding and cabling: Use twisted pair with a nominal 120-ohm characteristic impedance. Proper ground connections are essential for noise immunity; consider ground loops in systems spanning multiple enclosures, and note that the transceiver's common-mode range, not the differential signal, is what a ground offset consumes.
  • Protection: Common-mode chokes and transient suppression on CAN_H and CAN_L are standard practice where the bus leaves an enclosure or runs near switched inductive loads.

Software Development

CAN software development encompasses driver implementation, message handling, and application logic.

  • Driver architecture: CAN drivers typically provide interrupt-driven reception, transmit queuing, and filter configuration interfaces. Transmit buffers must be serviced in priority order; a driver that sends strictly first-in, first-out can invert priority inside the node even though the bus arbitrates correctly.
  • Message scheduling: Periodic transmission requires careful scheduling to avoid bus overload and ensure timely delivery. Offsetting the phase of periodic messages prevents the transmission bursts that occur when many tasks share a common period.
  • Error handling: Applications should monitor the error counters and state transitions, treat entry into error passive as a warning, and define an explicit policy for bus-off recovery rather than relying on controller defaults.
  • Signal databases: Message and signal layouts are usually maintained in a database file, most commonly the DBC format, from which both ECU code and analysis tools are generated. A shared database prevents the scaling and byte-order mismatches that dominate integration defects.
  • Transport and diagnostics: ISO 15765-2, widely called ISO-TP, segments payloads larger than a single frame for passenger-car diagnostics, and Unified Diagnostic Services (ISO 14229) runs on top of it. J1939 uses its own transport protocol instead.
  • Protocol stacks and tooling: CANopen and J1939 stacks are available commercially and as open source. On Linux, SocketCAN exposes CAN interfaces as network devices, so ordinary sockets, virtual interfaces, and standard capture tools work against real or simulated buses.

Applications

CAN's reliability, real-time performance, and cost-effectiveness have driven adoption across numerous industries:

Automotive: CAN is the standard for vehicle networking, connecting engine controllers, transmission systems, body electronics, and safety systems. A typical vehicle carries several CAN segments at different bit rates, joined by a gateway that also serves the diagnostic connector. Regulations require pins 6 and 14 of the OBD-II connector to expose a CAN interface, which is why aftermarket scan tools work across brands.

Electric vehicles: Battery management systems use CAN to report cell voltages, temperatures, and contactor state to the vehicle controller, and charging standards built on CCS use a CAN link between vehicle and charger to negotiate current and monitor the session.

Industrial automation: CANopen and DeviceNet, both built on CAN, connect sensors, actuators, drives, and controllers in manufacturing environments where a full fieldbus is warranted but Ethernet cabling is not.

Heavy vehicles and off-highway equipment: J1939 is the standard for trucks and buses, and its ISOBUS derivative lets tractors and implements from different manufacturers interoperate through a single in-cab terminal.

Medical devices: CAN networks connect modules inside infusion systems, imaging equipment, and patient monitors, where deterministic behavior and fault confinement matter more than bandwidth.

Building automation: CAN-based systems control HVAC, lighting, elevators, and access control, often over long runs at reduced bit rates.

Marine and aerospace: NMEA 2000 serves marine electronics, while CANaerospace and ARINC 825 serve aircraft systems, where weight and reliability are paramount. CAN has also flown on satellites and launch vehicles, valued for the low mass of a two-wire bus and its tolerance of node failure.

The trade-off that defines CAN's niche is bandwidth against determinism and cost. Where a system needs megabytes per second, automotive Ethernet is now the better answer; where it needs a handful of short, prioritized, reliably delivered messages over a cheap twisted pair in a hostile electrical environment, CAN remains difficult to displace.

Troubleshooting

Common CAN network issues and diagnostic approaches include:

  • No communication at all: With the bus unpowered, measure resistance between CAN_H and CAN_L. Roughly 60 ohms indicates two correct terminators; about 120 ohms means one is missing or disconnected; about 40 ohms means a third has been added somewhere in the middle.
  • A single node that cannot transmit: Repeated frames with no acknowledgment usually mean a bit rate or sample point mismatch, since no other node accepts the frame. A lone node on a bench bus shows the same symptom for a legitimate reason: CAN requires at least one other node to supply the ACK bit.
  • Intermittent errors: Look for loose connectors, marginal grounding, excessive stub length, or nearby switching noise. Probe CAN_H and CAN_L with an oscilloscope and look for ringing that has not settled by the sample point.
  • Bus-off conditions: Read the error counters before recovery clears them. Bisect the network by disconnecting nodes to find the offender, and check whether a software fault is queueing frames faster than the bus can carry them.
  • Message delays: Measure bus load and compare observed latency against a response-time analysis. Sustained load above roughly 70 percent, or a burst of high-priority traffic, will delay low-priority frames well beyond their nominal period.
  • EMC issues: Verify termination and grounding first, then consider split termination, common-mode chokes, and shield treatment. Radiated emissions from CAN are frequently a symptom of a common-mode imbalance rather than of the differential signal itself.

CAN analyzers are invaluable for debugging, providing message logging, bus statistics, error frame counts, and trigger conditions. Many support protocol-specific decoding for CANopen, J1939, and other higher-layer protocols, and an oscilloscope with CAN decoding bridges the gap between a clean logical trace and a marginal electrical one.

Summary

Controller Area Network remains a leading choice for embedded communication in demanding environments. Nearly every distinctive property traces back to one design decision: a wired-AND bus in which dominant bits override recessive ones. That single mechanism yields non-destructive arbitration, in-frame acknowledgment, globalized error signaling, and consistent data reception across all nodes, at the cost of a bit rate limited by round-trip propagation.

Higher-layer protocols extend the base protocol into specific domains: CANopen for industrial machinery, J1939 and its ISOBUS and NMEA 2000 derivatives for commercial vehicles, farm equipment, and boats. Each supplies the addressing, device profiles, and diagnostics that the data link layer deliberately leaves undefined.

The family continues to evolve. CAN FD raised payloads to 64 bytes and data-phase rates into the multi-megabit range, and CAN XL extends that to 2,048-byte payloads with native security while keeping the arbitration model intact. Engineers who understand bit timing, error management, and priority assignment can design CAN networks that behave predictably for the decades these systems are expected to last.

Related Topics