CAN bus
| Also called | Controller Area Network, CAN, Classical CAN, CAN CC |
|---|---|
| Type | Serial bus system for embedded control networks |
| Developer | Robert Bosch GmbH |
| Introduced | 1986 |
| Standard | ISO 11898 series |
| Generations | CAN CC, CAN FD, CAN XL |
A CAN bus (Controller Area Network) is a serial bus system on which connected nodes broadcast messages, each carrying an identifier that sets its priority on the bus. Robert Bosch GmbH introduced it in February 1986.[1] Almost every new passenger car manufactured in Europe is equipped with at least one CAN network. CAN is also used in other types of vehicles, from trains to ships, and in industrial controls.[1]
For an industrial computer, a CAN interface is the link to the control network of a vehicle or machine. Commercial vehicles use SAE J1939, agriculture and forestry machines use ISO 11783, and CANopen was designed for motion-oriented machine control such as handling systems.[2][3] On Linux, CAN hardware appears to software as a network interface through SocketCAN.[4]
History
Uwe Kiencke started the development of a new serial bus system in 1983. In February 1986, Bosch presented it at the SAE congress in Detroit as the "Automotive Serial Controller Area Network". Intel delivered the first CAN controller chip, the 82526, in mid 1987. Since 1991, Mercedes-Benz has used CAN in its upper-class passenger cars.[1]
ISO published the ISO 11898 standard in November 1993.[1] SAE International developed the J1939 recommended practice in the early 1990s.[2] Bosch started CAN FD (flexible data rate) development in 2011, and CAN FD was officially introduced in 2012 at the 13th international CAN Conference.[5][1] Classical CAN and CAN FD are now standardized together in ISO 11898-1:2024, which also covers CAN XL.[5][6]
How it works
Communication on a CAN bus is broadcast. CAN in Automation (CiA) lists broadcast communication as a feature that reduces bandwidth requirements.[7] Each frame carries an identifier that consists of either an 11-bit or a 29-bit binary value. The lowest identifier value has the highest priority.[7]
- Bitwise arbitration: when several nodes start sending at once, the dominant bus state overwrites the recessive state. A node that sends a recessive bit and sees a dominant one loses arbitration and becomes a receiver.[7]
- Data field: in a Classical CAN frame, the data field holds the application data, from zero up to eight data bytes.[7]
- Error detection: the data link layer has five error detection mechanisms: the CRC check, frame checks, acknowledgment error detection, bit monitoring and bit stuffing.[7]
- Error handling: after an error frame, the receivers expect a retransmission of the aborted data frame. Faulty nodes switch off their CAN interface by entering the bus-off state.[7]
Physical layer
The ISO 11898 series specifies the CAN lower layers, which cover the physical medium attachment (PMA) sublayer, the physical coding sublayer (PCS) and the data link layer.[8] Most common is high-speed transmission up to 1 Mbit/s.[8]
On the bus lines CAN_H and CAN_L, a high-speed transceiver provides a differential voltage. For recessive bits, both lines are driven to a nominal 2.5 V. In the dominant state, CAN_H measures a nominal 3.5 V and CAN_L 1.5 V.[9] CiA recommends a line topology terminated at both ends with 120 Ω resistors.[9]
Bit rate limits network length. At 1 Mbit/s the theoretical reach is 40 m. Real cables, connectors and other physical layer components give a shorter reach. Reducing the bit rate allows longer cables.[9]
Several physical layer options exist:[8]
- High-speed: ISO 11898-2:2024 covers the high-speed transceiver, the CAN SIC and CAN SIC XL transceivers, and CAN FD transceivers for bit rates up to 2 Mbit/s and up to 5 Mbit/s.
- Low-power, fault-tolerant: ISO 11898-3:2006 specifies this transceiver, which is limited to 125 kbit/s. CiA no longer recommends it for new designs.
- Truck and trailer: an application-specific attachment standardized in ISO 11992-1, which is also limited to 125 kbit/s.
- Single-wire: the single-wire CAN transceiver in SAE J2411, which CiA no longer recommends for new designs.
Classical CAN, CAN FD and CAN XL
CiA names three generations of the protocol: CAN CC, CAN FD and CAN XL.[8] In CAN FD, the payload is up to 64 bytes long and no longer limited to 8 bytes.[5] In the data phase, the bit rate is limited by the transceiver characteristics. A CAN FD protocol controller also supports Classical CAN frames.[5]
CAN XL has a data field length of 1 to 2048 bytes. CiA describes it as intended for backbone and sub-backbone network applications.[6] Its optional PWM coding allows bit rates of 20 Mbit/s and higher, depending on the physical network design. For bit rates of 20 Mbit/s and beyond, CAN XL nodes need CAN SIC XL transceivers.[6]
| Attribute | Classical CAN (CAN CC) | CAN FD | CAN XL |
|---|---|---|---|
| Data field | 0 to 8 bytes | Up to 64 bytes | 1 to 2048 bytes |
| Bit rate | High-speed transmission up to 1 Mbit/s | Data phase up to 2 Mbit/s and up to 5 Mbit/s with ISO 11898-2:2024 FD transceivers; about 8 Mbit/s with CAN SIC transceivers | 20 Mbit/s and higher with PWM coding, depending on network design; needs CAN SIC XL transceivers |
| Standard | ISO 11898-1:2024 | ISO 11898-1:2024 | ISO 11898-1:2024 |
Higher-layer protocols
ISO 11898 specifies the lower layers of CAN.[8] Application profiles and higher-layer protocols built on CAN serve specific industries:
- Machine control: CANopen is a CAN-based communication system whose application layer and communication profile are specified in CiA 301. It was designed originally for motion-oriented machine control systems, such as handling systems.[3]
- Commercial vehicles: SAE J1939 is an application profile from SAE International, originally intended for diesel powertrain applications. Profiles for other commercial vehicle uses, including e-truck powertrains, were added later.[2]
- Agriculture and forestry: the ISO 11783 series, also known as Isobus, covers agriculture and forestry machines. CiA lists it in the J1939 profile family.[2]
- Maritime electronics: IEC 61162-3, also known as NMEA 2000, is also in the J1939 profile family.[2]
Use with industrial computers
On Linux, the SocketCAN package implements CAN protocols. SocketCAN uses the Berkeley socket API and the Linux network stack, and implements CAN device drivers as network interfaces.[4]
Before SocketCAN, most existing Linux CAN implementations came as device drivers for CAN hardware, based on character devices. Changing CAN hardware often meant adapting large parts of the application to the new driver's API. With SocketCAN, a driver for CAN controller hardware registers itself with the Linux network layer as a network device.[4]
The kernel documentation gives ip link set canX type can bitrate 125000 as an example of setting an interface's bit rate. It also describes vcan, a virtual local CAN interface similar to the network loopback device. CAN FD frames on raw CAN sockets need the socket option CAN_RAW_FD_FRAMES, which is off by default.[4]
For other serial links found on industrial computers, see Serial ports: RS-232, RS-422, RS-485.
Frequently asked questions
What is the difference between CAN and CAN FD?
A Classical CAN frame carries 0 to 8 data bytes. A CAN FD frame carries up to 64 bytes and can switch to a higher bit rate in its data phase. CAN FD controllers also support Classical CAN frames, and both formats are standardized in ISO 11898-1:2024.
How fast is CAN bus?
Classical high-speed CAN runs up to 1 Mbit/s. CAN FD transceivers in ISO 11898-2:2024 are specified for data-phase bit rates up to 2 Mbit/s and up to 5 Mbit/s. For CAN XL, PWM coding allows bit rates of 20 Mbit/s and higher, which need CAN SIC XL transceivers.
Does a CAN bus need termination resistors?
For high-speed CAN, CiA recommends a line topology terminated at both ends with 120 Ω resistors.
How long can a CAN bus be?
Length depends on bit rate. At 1 Mbit/s the theoretical reach is 40 m, and real cables and connectors shorten it. Reducing the bit rate allows longer cables.
How does a Linux industrial PC read CAN data?
Through SocketCAN, which implements CAN device drivers as network interfaces. Programs then use the Berkeley socket API to send and receive CAN frames.
See also
- Industrial computers
- Box PCs
- Serial ports: RS-232, RS-422, RS-485
- Ignition power control
- Modular I/O expansion
References
- CAN in Automation, History of CAN technology. CAN in Automation, 2026.
- CAN in Automation, J1939 profile family. CAN in Automation, 2026.
- CAN in Automation, CANopen. CAN in Automation, 2026.
- The Linux kernel documentation, SocketCAN: Controller Area Network. kernel.org, 2026.
- CAN in Automation, CAN FD: the basic idea. CAN in Automation, 2026.
- CAN in Automation, CAN XL. CAN in Automation, 2026.
- CAN in Automation, CAN CC. CAN in Automation, 2026.
- CAN in Automation, CAN knowledge. CAN in Automation, 2026.
- CAN in Automation, CAN HS (high-speed) transmission. CAN in Automation, 2026.
