All diagnostics
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

FieldBitsDescription
PID8Packet Identifier (CMD/RES/EV/DAQ)
CTR8Optional counter
DatavarCommand-specific payload

Byte structure — request & response

XCP — ASAM MCD-1 (CTO command example)

Frame template
[(Transport hdr)] [PID 1B][CTR 1B][Data…]
Request
OffSizeFieldValueDescription
01 BPID0xFFCMD packet identifier.
11 BMode0x000xFF 0x00 = CONNECT command.
Response
OffSizeFieldValueDescription
01 BPID0xFFRES (positive response) packet ID.
11 BResource0x15Bitmask of supported resources (CAL, DAQ, PGM…).
21 BComMode0xC0Byte order, address granularity flags.
31 BMax CTO0x08Largest CTO packet supported.
4–52 BMax DTO08 01Largest DTO packet (little-endian).
61 BProtocol Version0x01XCP protocol layer version.
71 BTransport Version0x01Transport 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.