As vehicles become more and more complex with advanced embedded systems, the development engineers need a high-speed and efficient way to access and adjust ECU parameters. The XCP protocol as defined in ASAM standards, formerly known as CCP, offers a solution. The XCP acronym stands for Universal Measurement and Calibration Protocol, and it is designed to connect calibration systems to ECUs.
The first letter X indicates that the protocol layer is independent of the transport layer, enabling it to work over various bus systems. Currently, the XCP protocol supports CAN (FD), FlexRay, Ethernet and serial links. Using a standardised interface makes it easy to adapt to different vehicle architectures and integrate tools for measurement and calibration into them.
To acquire data, the XCP master sends periodic requests to the slave in order to read memory locations of interest. The time between these events depends on the underlying bus system and may not be equidistant. Moreover, there are single events that cannot be synchronized with the cyclic ECU tasks that execute the control algorithms, such as an arbitrary activation of a switch by the driver.
To solve these problems, the XCP protocol timestamps each Measurement data sample it sends to the slave, which enables the acquiring tool to correlate the samples with the corresponding events. To this end, each XCP message contains the command field and the timestamp field. The command field consists of 2 bytes and is used by the XCP master to send a specific request to the ECU. The timestamp field consists of two bytes that indicate the time of sampling of accompanying data.