Transport, diagnostic, and calibration protocols
Above the CAN physical layer, several standardized protocols enable the transport of large messages, ECU diagnostics, and real-time calibration. Here are the four protocols most widely used in the automotive industry.
ISO-TP (ISO 15765-2) — Transport over CAN
The CAN protocol limits each frame to 8 data bytes (64 bytes in CAN FD). ISO-TP (Transport Protocol) solves this limitation by allowing large messages to be segmented and reassembled (up to 4,095 bytes) over a CAN network.
Segmentation mechanism
ISO-TP defines four frame types:
| Type | Role | Content |
|---|---|---|
| Single Frame (SF) | Message court (< 8 octets) | Complete data in a single frame |
| First Frame (FF) | Start of a long message | Total size + first data bytes |
| Consecutive Frame (CF) | Message continuation | Sequence number + next data block |
| Flow Control (FC) | Flow control | The receiver indicates how many CFs it can accept and at what interval |
ISO-TP is the mandatory transport layer for UDS and OBD-II diagnostic protocols over CAN. PEAK-System offers the PCAN-ISO-TP API to integrate this protocol into your applications.
UDS (ISO 14229) — Unified Diagnostics
UDS (Unified Diagnostic Services) is the standardized diagnostic protocol for automotive ECUs. It runs on top of ISO-TP and defines a set of request/response services for communicating with any ECU in a uniform way.
Main services
| Service | ID | Usage |
|---|---|---|
| DiagnosticSessionControl | 0x10 | Switch between sessions (default, programming, extended) |
| ECUReset | 0x11 | Restart the controller |
| ReadDataByIdentifier | 0x22 | Read a parameter (serial number, firmware version, etc.) |
| WriteDataByIdentifier | 0x2E | Write a parameter (configuration, calibration) |
| ReadDTCInformation | 0x19 | Read stored diagnostic trouble codes (DTC) |
| ClearDiagnosticInformation | 0x14 | Clear fault codes |
| RoutineControl | 0x31 | Launch a routine (actuator test, self-diagnosis) |
| RequestDownload / TransferData | 0x34 / 0x36 | Flash new firmware into the ECU |
| SecurityAccess | 0x27 | Unlock protected functions (seed-and-key) |
UDS is used across all automotive production lines for end-of-line programming, workshop fault code reading, and firmware updates. PEAK-System offers the PCAN-UDS API to implement a UDS client or server.
CCP (CAN Calibration Protocol) — Calibration over CAN
CCP is a protocol standardized by ASAM (Association for Standardisation of Automation and Measuring Systems) enabling the calibration and measurement of parameters on automotive ECUs via the CAN bus.
Operating principles
- Master-slave architecture — a calibration tool (master) communicates with an ECU (slave) via two dedicated CAN identifiers (CRO and DTO).
- Direct memory access — the master can read and write the ECU's memory (RAM, Flash, EEPROM) to modify engine maps in real time.
- DAQ lists — a periodic measurement mechanism: the master configures lists of memory addresses, and the slave cyclically sends the corresponding values, enabling real-time data acquisition.
- Flashing — CCP also allows reprogramming the ECU's firmware.
PEAK-System offers the PCAN-CCP API to integrate this protocol. However, CCP has been progressively superseded by XCP, its more flexible successor.
XCP (Universal Measurement and Calibration Protocol) — Successor to CCP
XCP, also standardized by ASAM, is the universal successor to CCP. Its major innovation: the separation between the protocol and the transport layer, making it independent of the communication bus.
Supported transport
| Transport | Abbreviation | Typical usage |
|---|---|---|
| CAN / CAN FD | XCP on CAN | Direct migration from CCP, compatible with existing bus |
| Ethernet | XCP on Ethernet | High bit rate for modern vehicles, up to 1 Gbit/s |
| USB | XCP on USB | Direct PC-ECU connection in development |
| SxI (RS-232, SPI) | XCP on SxI | Embedded systems with serial interface |
Key features
- DAQ (Data Acquisition) — synchronous, high-frequency measurement of internal ECU variables, with precise timestamping.
- STIM (Stimulation) — injecting values into ECU variables to simulate operating conditions.
- Online calibration — modifying parameters (maps, gains, thresholds) while the ECU is running, using the memory page concept (working page / reference page).
- Flash Programming — reprogramming the ECU's firmware.
XCP is now the industry standard for engine development and calibration, supported by all major tools (INCA, CANape, ETAS). PEAK-System offers the PCAN-XCP API to integrate this protocol.
Protocol comparison
| Criterion | ISO-TP | UDS | CCP | XCP |
|---|---|---|---|---|
| Role | Transport | Diagnostic | Calibration | Calibration |
| Standard | ISO 15765-2 | ISO 14229 | ASAM | ASAM |
| Transport | CAN only | Over ISO-TP | CAN only | CAN, Ethernet, USB, SxI |
| Message size | 4 095 octets | Variable (via ISO-TP) | 8 octets CAN | Varies according to transport |
| PEAK API | PCAN-ISO-TP | PCAN-UDS | PCAN-CCP | PCAN-XCP |