CAN bus basics (SSP 238)
How a CAN bus works, summarised from SSP 238, which covers the VW Group in general, with notes on the A4.
This page summarises Self-Study Programme 238, VW/Audi’s introduction to CAN. The SSP covers the VW Group in general, not the A4 in particular. Notes marked On the A4 link it to the car using SSP 254 and the wiring manual. For how the A4 is actually wired, see CAN bus in the A4 B6/B7.
Why a bus?
Section titled “Why a bus?”Without a bus, every sensor value that more than one module needs has to be wired to each of them separately. CAN (Controller Area Network) lets modules share the data over one common line. SSP 238 lists these benefits:
- one common protocol for all data exchange, a “data highway”
- systems that span several modules (ESP, for example) are easier to build
- options can be added without rewiring
- the protocol is independent of the physical medium (copper or optical fibre)
- diagnosis across modules becomes possible
At the time the K-wire was still the main diagnosis line. Some modules were already diagnosed over CAN through a gateway, which the SSP calls a “virtual K-wire”.
Three buses, three speeds
Section titled “Three buses, three speeds”CAN can run at up to 1000 kbit/s. VW and Audi set 500 kbit/s as their maximum and split the network by how time-critical the data is:
| Bus | Speed | Timing need |
|---|---|---|
| Drivetrain CAN (high-speed) | 500 kbit/s | almost real time |
| Convenience CAN (low-speed) | 100 kbit/s | low |
| Infotainment CAN (low-speed) | 100 kbit/s | low |
On the A4: SSP 254 lists exactly these three for the B6; see CAN bus in the A4.
Development history (VW Group)
Section titled “Development history (VW Group)”| Model year | Step |
|---|---|
| MY97 | First production CAN: 62.5 kbit/s convenience system in the Passat |
| MY98 | Drivetrain CAN at 500 kbit/s in Golf and Passat |
| MY00 | Gateway puts K-wire diagnosis onto CAN (Golf, Passat). 100 kbit/s convenience CAN and a drivetrain/convenience gateway in the Škoda Fabia |
| MY01 | 100 kbit/s convenience CAN standard across the Group (e.g. Passat) |
The B6 A4 (launched for MY2001/2002) came after all of these, so it uses the 100 kbit/s convenience bus.
The basic system
Section titled “The basic system”- All modules connect in parallel to the bus through a transceiver. No module has priority over the others; the SSP calls this a multimaster system.
- Data is sent serially, one bit after another.
- The SSP points out that CAN can work in principle on a single wire. A second wire carrying the inverted signal makes the bus much more resistant to interference, and that is how the production buses are built.
On the A4: every CAN on the car is a twisted pair (CAN-High + CAN-Low). Only the low-speed buses (convenience, infotainment) can keep running on one wire after a fault. The drivetrain CAN cannot (see SSP 269 summary).
Messages and the broadcast principle
Section titled “Messages and the broadcast principle”A message carries values such as engine speed. The sending module turns the value into a serial bit stream. Its transceiver turns the bits into voltages on the bus. Every receiver’s transceiver turns the voltages back into bits.
CAN messages are broadcast: one module sends, every module receives. Each receiver decides for itself whether it needs the message. All modules therefore always have the same information.
Inside a module
Section titled “Inside a module”| Part | Job |
|---|---|
| Microcontroller | Reads sensors into an input memory, runs the program, writes results to an output memory for the actuators. Has an extra memory area for CAN messages. |
| CAN module (CAN controller) | Handles sending and receiving of CAN messages through a transmit mailbox and a receive mailbox. Usually built into the microcontroller chip. |
| Transceiver | Transmit/receive amplifier. Converts the logic bit stream to line voltages and back. Connected to the CAN module by the TX (transmit) and RX (receive) lines. The RX line watches the bus all the time. |
| K-wire | Separate line to the diagnostic connector for the workshop tester. |
Recessive and dominant
Section titled “Recessive and dominant”The transmitter output works like an open switch to ground (an “open collector”):
- Switch open = logic 1 = recessive. The bus is pulled to its rest level through a resistor.
- Switch closed = logic 0 = dominant. The bus is pulled to the active level.
If any module sends a dominant bit, the bus is dominant. Only when every module is recessive does the bus stay recessive. Arbitration and error signalling both depend on this.
Sending and receiving a message
Section titled “Sending and receiving a message”SSP 238 uses one example throughout: engine speed travels from the engine control module to the rev counter in the dash panel insert.
Message format (basic CAN frame as described in the SSP):
| Field | Size | Purpose |
|---|---|---|
| Identifier | 11 bits | Names the message and sets its priority (e.g. “Engine_1”) |
| Data | up to 8 bytes | The content (engine speed, idle speed, torque …) |
| CRC | 16 bits | Checksum for error detection |
| Acknowledge | 2 bits | Receivers confirm correct reception |
Sending:
- The engine module stores the current engine speed cyclically and copies it into the CAN module’s transmit mailbox. A “transmit flag” marks it as ready.
- The CAN module checks on the RX line whether the bus is free (recessive for a set time). If the bus is busy, it waits.
- When the bus is free, it sends the message.
Receiving happens in two steps in every module:
- Monitoring level. The receiver works out the CRC and compares it with the received one. If they match, it sends the acknowledge bit.
- Acceptance level. The module decides whether it needs the message at all. If not, it discards it. If so, it puts it in the receive mailbox and raises a “receive flag”. The cluster then reads the value and drives the rev counter.
Messages repeat on a fixed cycle (the SSP’s example is every 10 ms).
On the A4: the cluster J285 is on the drivetrain CAN with the engine module (J220 on the B6, J623 on the B7) and the ABS module J104. These are the same three modules as in the SSP’s example network.
Arbitration: who may send
Section titled “Arbitration: who may send”If several modules start sending at the same moment, each one compares bit by bit what it sends (TX) with what it reads back from the bus (RX). A module that sends recessive but reads dominant has lost. It stops sending and becomes a receiver. The module with the most dominant (zero) bits at the start of its identifier wins. So the lower the identifier, the higher the priority, and the winning message gets through undamaged. SSP 238’s drivetrain example names the identifiers Engine_1, Brake_1, Combi_1, Steeringangle_1 and Gearbox_1. In that example the steering angle sensor message has the lowest number and wins.
Error handling
Section titled “Error handling”CAN’s built-in error checking catches almost every transmission error. The SSP puts the undetected-error rate below 10⁻¹², which is about four errors over the life of a car.
- Error frame: a module that detects an error sends an error message of more than 6 dominant bits. Every module throws the current message away and the sender repeats it automatically. An occasional repeat is normal, for example during the voltage dip at engine start.
- Error counters: each module counts transmit and receive errors. The count goes up with each error and back down with each good transmission. The SSP’s diagram shows three states: error active (normal), error passive (above 127) and bus off (at 255). A module that has to repeat too often (about 32 repeats) is switched off the bus. It tries again after about 0.2 s. These internal counters cannot be read out.
- Fault memory entries:
- “Data bus defective”: the module went bus-off at least twice with no communication in between.
- “No signal/communication” / missing messages: each receiver monitors message timing. If about ten consecutive cycles of an expected message are missing, a timeout is stored in the receiving module.
Diagnosis tips from the SSP
Section titled “Diagnosis tips from the SSP”- A CAN value is either correct or missing. If the rev counter shows a plausible but wrong value, suspect the sensor, the gauge or its supply, not the bus. A bus fault makes the value disappear (the rev counter drops to 0).
- After a repair, restart the engine so the fault memories update. A healthy car has no CAN fault entries in any operating state.
- The tester (VAS 5051/5052) reports a general CAN fault and names the module. The gateway’s measured value blocks 125, 126 … show each bus user as 1 (active) or 0 (not responding).
- If that is not enough, use an oscilloscope. See SSP 269.
On the A4: the SSP 238 examples use a separate gateway (diagnostic address 19, “J533”). The A4 has none: the instrument cluster is the gateway and holds the CAN fault entries (see The gateway is in the instrument cluster).
Related
Section titled “Related”Parts in the wiring data
| Code | Name | Models | Location |
|---|---|---|---|
J285 | Control module with indicator unit in instrument panel insert | B6 and B7 | Behind display unit |
J220 | Motronic Engine Control Module (ECM) | B6 only | In electronics box, plenum chamber |
J623 | Engine Control Module (ECM) | B7 only | Under the plenum chamber cover |
J104 | ABS Control Module (w/EDL) | B6 and B7 | In engine compartment, on hydraulic unit, front left |
Sources
- SSP 238 – Data Exchange on the CAN Bus I — Audi / VolkswagenBasics, technical status 10/01. Describes the VW Group in general; examples use the Polo MY2002.
- SSP 254 – Audi A4 '01 Technical Features — AudiUsed only for the A4-specific notes.
- Audi A4 Wiring Diagrams and Component Locations (12.2005), via the wiring database — AudiUsed only for the A4-specific notes.