XCP - Part 5 - Example Communication Sequences - 1.0
XCP - Part 5 - Example Communication Sequences - 1.0
Version 1.0
Part 5
Example Communication Sequences
Date: 2003-04-08
Authors: Roel Schuermans, Vector Informatik GmbH
Rainer Zaiser, Vector Informatik GmbH
Frank Hepperle, DaimlerChrysler AG
Hans Schröter, DaimlerChrysler AG
Reiner Motz, Robert Bosch GmbH
Andreas Aberfeld, Robert Bosch GmbH
Hans-Georg Kunz, Siemens VDO Automotive AG
Thomas Tyl, Siemens VDO Automotive AG
Robert Leinfellner, dSPACE GmbH
Hendirk Amsbeck, dSPACE GmbH
Harald Styrsky, Compact Dynamics GmbH
Boris Ruoff, ETAS GmbH
Lars Wahlmann, Accurate Technologies Inc.
Version: 1.0
Doc-ID: XCP -Part 5- Example Communication Sequences -1.0
Status: Released
Type Final
Disclaimer of Warranty
Although this document was created with the utmost care it cannot be guaranteed
that it is completely free of errors or inconsistencies.
ASAM e.V. makes no representations or warranties with respect to the contents or
use of this documentation, and specifically disclaims any expressed or implied
warranties of merchantability or fitness for any particular purpose. Neither ASAM
nor the author(s) therefore accept any liability for damages or other consequences
that arise from the use of this document.
ASAM e.V. reserves the right to revise this publication and to make changes to its
content, at any time, without obligation to notify any person or entity of such
revisions or changes.
This revision history shows only major modifications between release versions.
0 Introduction ........................................................................................................5
0.1 The XCP Protocol Family............................................................................................... 5
0.2 Documentation Overview............................................................................................... 6
0.3 Definitions and Abbreviations........................................................................................ 7
This document is based on experiences with the CAN Calibration Protocol (CCP) version 2.1 as
described in feedback from the companies Accurate Technologies Inc., Compact Dynamics GmbH,
DaimlerChrysler AG, dSPACE GmbH, ETAS GmbH, Kleinknecht Automotive GmbH, Robert Bosch
GmbH, Siemens VDO Automotive AG and Vector Informatik GmbH.
The XCP Specification documents describe an improved and generalized version of CCP.
The generalized protocol definition serves as standard for a protocol family and is called “XCP”
(Universal Measurement and Calibration Protocol).
The “X” generalizes the “various” transportation layers that are used by the members of the protocol
family e.g “XCP on CAN”, “XCP on TCP/IP”, “XCP on UDP/IP”, “XCP on USB” and so on.
Part 1 “Overview” gives an overview over the XCP protocol family, the XCP features and the
fundamental protocol definitions.
Part 2 “Protocol Layer Specification” defines the generic protocol, which is independent from the
transportation layer used.
Part 3 “Transport Layer Specification” defines the way how the XCP protocol is transported by a
particular transportation layer like CAN, TCP/IP and UDP/IP.
Part 4 “Interface Specification” defines the interfaces from an XCP master to an ASAM MCD 2MC
description file and for calculating Seed & Key algorithms and checksums.
Part 5 “Example Communication Sequences” gives example sequences for typical actions
performed with XCP (this document).
Everything not explicitly mentioned in this document, should be considered as implementation specific.
The following table gives an overview about the most commonly used definitions and
abbreviations throughout this document.
Abbreviation Description
A2L File Extension for an ASAM 2MC Language File
AML ASAM 2 Meta Language
ASAM Association for Standardization of Automation and Measuring Systems
BYP BYPassing
CAL CALibration
CAN Controller Area Network
CCP Can Calibration Protocol
CMD CoMmanD
CS CheckSum
CTO Command Transfer Object
CTR CounTeR
DAQ Data AcQuisition, Data AcQuisition Packet
DTO Data Transfer Object
ECU Electronic Control Unit
ERR ERRor Packet
EV EVent Packet
LEN LENgth
MCD Measurement Calibration and Diagnostics
MTA Memory Transfer Address
ODT Object Descriptor Table
PAG PAGing
PGM ProGraMming
PID Packet IDentifier
RES command RESponse packet
SERV SERVice request packet
SPI Serial Peripheral Interface
STD STanDard
STIM Data STIMulation packet
TCP/IP Transfer Control Protocol / Internet Protocol
TS Time Stamp
UDP/IP Unified Data Protocol / Internet Protocol
USB Universal Serial Bus
XCP Universal Calibration Protocol
MAX_CTO = 0x08
MAX_DTO = 0x0008
XCP Protocol Layer Version = 0x10
XCP Transport Layer Version = 0x10
! GET_COMM_MODE_INFO FB
" RES FF xx 01 xx 02 00 xx 64 COMM_MODE_OPTIONAL=0x01
=> Master Block Mode available
MAX_BS = 0x02
MIN_ST = 0x00
XCP Driver Version = 0x64
! GET_STATUS FD
" RES FF 00 15 xx 00 00 Current Session Status = 0x00
=> no request active,
Resume not active,
no DAQ running
Resource Protection Status = 0x15
=> CAL/PAG, DAQ, PGM are protected
Session Configuration ID= 0x0000
=> no RESUME session configured
1.2.1 Getting the current active pages for ECU access and XCP access
For n = 0 to MAX_SEGMENTS-1 do
For n = 0 to MAX_SEGMENTS-1 do
For n = 0 to MAX_EVENT_CHANNEL-1 do
FF 10 01 00 01 00 00 40
For n = 0 to MAX_DAQ-1 do
For j = 0 to J_Upper_Limit do
For n = 0 to MAX_DAQ-1 do
For n = 0 to MAX_DAQ-1 do
For n = 0 to MAX_DAQ-1 do