ASAM MCD-1 XCP
XCP
Universal calibration & measurement protocol.
Overview
XCP is used during ECU development to read/write internal variables and characteristics in real time. It supports calibration of look-up tables, high-rate measurement (DAQ lists) and bypassing.
Frame / message structure
| Field | Bits | Description |
|---|---|---|
| PID | 8 | Packet Identifier (CMD/RES/EV/DAQ) |
| CTR | 8 | Optional counter |
| Data | var | Command-specific payload |
Byte structure — request & response
XCP — ASAM MCD-1 (CTO command example)
Frame template
[(Transport hdr)] [PID 1B][CTR 1B][Data…]Request
| Off | Size | Field | Value | Description |
|---|---|---|---|---|
| 0 | 1 B | PID | 0xFF | CMD packet identifier. |
| 1 | 1 B | Mode | 0x00 | 0xFF 0x00 = CONNECT command. |
Response
| Off | Size | Field | Value | Description |
|---|---|---|---|---|
| 0 | 1 B | PID | 0xFF | RES (positive response) packet ID. |
| 1 | 1 B | Resource | 0x15 | Bitmask of supported resources (CAL, DAQ, PGM…). |
| 2 | 1 B | ComMode | 0xC0 | Byte order, address granularity flags. |
| 3 | 1 B | Max CTO | 0x08 | Largest CTO packet supported. |
| 4–5 | 2 B | Max DTO | 08 01 | Largest DTO packet (little-endian). |
| 6 | 1 B | Protocol Version | 0x01 | XCP protocol layer version. |
| 7 | 1 B | Transport Version | 0x01 | Transport layer version. |
XCP packets sit inside a transport-specific header (XCP-on-CAN, XCP-on-Ethernet UDP/TCP, XCP-on-FlexRay, …) which adds length/counter fields before the PID byte shown here.
Use cases
- · ECU calibration
- · Rapid prototyping
- · Measurement at high rates
Pros
- High-rate DAQ
- Transport-agnostic
- Standardized A2L description
Cons
- Development tool, not for series diagnostics
Request / Response examples
Connect to slave
Request
FF00
Response
FF15C00808010101
Slave responds with resource info, byte order and address granularity.