XCP
Version 1.1
Part 2 - Protocol Layer
Specification
Part 2 – Protocol Layer Specification
Association for Standardisation of
Automation and Measuring Systems
Dated:31-03-2008
© ASAM e. V.
Part 2 - Protocol Layer Specification
Status of Document
Date:
Author:
Version:
Doc-ID:
Status:
Type
31-03-2008
Roel Schuermans, Vector Informatik GmbH
Andreas Zeiser, Vector Informatik GmbH
Oliver Kitt, Vector Informatik GmbH
Hans-Georg Kunz, VDO Automotive AG
Hendirk Amsbeck, dSPACE GmbH
Bastian Kellers, dSPACE GmbH
Boris Ruoff, ETAS GmbH
Reiner Motz, Robert Bosch GmbH
Dirk Forwick, Robert Bosch GmbH
Version 1.1
Release
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.
2
XCP Version 1.1 Release
Part 2 - Protocol Layer Specification
Revision History
This revision history shows only major modifications between release versions.
Date
2008-03-31
Author
R.Schuermans
Filename
Comments
Released document
XCP Version 1.1 Release
3
Part 2 - Protocol Layer Specification
4
XCP Version 1.1 Release
Table of contents
Part 2 - Protocol Layer Specification
Introduction
0
0.1 The XCP Protocol Family
0.2 Documentation Overview
0.3 Definitions and Abbreviations
0.4 Mapping between XCP Data Types and ASAM Data Types
1 The XCP Protocol Layer
1.1 The XCP Packet
1.1.1 The XCP Packet Types
1.1.2 The XCP Packet Format
1.1.2.1 The Identification Field
1.1.2.2 The Timestamp Field
1.1.2.3 The Data Field
1.1.3 The CTO Packets
1.1.3.1 Command Packet (CMD)
1.1.3.2 Command Response packet (RES)
1.1.3.3 Error packet (ERR)
1.1.3.4 Event packet (EV)
1.1.3.5 Service Request packet (SERV)
1.1.4 The DTO Packets
1.1.4.1 Data Acquisition Packet (DAQ)
1.1.4.2 Synchronous Data Stimulation Packet (STIM)
1.1.5 The XCP Packet Identifiers
1.1.5.1 Master Slave
1.1.5.2 Slave Master
1.2 Table of Event codes (EV)
1.3 Table of Service Request codes (SERV)
1.4 Table of Command codes (CMD)
1.4.1 Standard commands (STD)
1.4.2 Calibration commands (CAL)
1.4.3 Page switching commands (PAG)
1.4.4 Data Acquisition and Stimulation commands (DAQ)
1.4.5 Non-volatile memory programming commands (PGM)
1.5 Table of bit mask coded parameters
1.6 Description of Commands
1.6.1 Standard commands (STD)
1.6.1.1 Mandatory commands
Version 1.1 Release
11
11
12
13
14
15
15
15
17
18
23
25
26
26
26
27
27
27
28
28
28
29
29
29
30
31
32
33
34
35
36
37
38
48
49
49
5
Part 2 - Protocol Layer Specification
1.6.1.1.1 Set up connection with slave
1.6.1.1.2 Disconnect from slave
1.6.1.1.3 Get current session status from slave
1.6.1.1.4 Synchronize command execution after time-out
1.6.1.2 Optional commands
1.6.1.2.1 Get communication mode info
1.6.1.2.2 Get identification from slave
1.6.1.2.3 Request to save to non-volatile memory
1.6.1.2.4 Get seed for unlocking a protected resource
1.6.1.2.5 Send key for unlocking a protected resource
1.6.1.2.6 Set Memory Transfer Address in slave
1.6.1.2.7 Upload from slave to master
1.6.1.2.8 Upload from slave to master (short version)
1.6.1.2.9 Build checksum over memory range
1.6.1.3 Auxiliary commands
1.6.1.3.1 Refer to transport layer specific command
1.6.1.3.2 Refer to user defined command
1.6.2 Calibration commands (CAL)
1.6.2.1 Mandatory commands
1.6.2.1.1 Download from master to slave
1.6.2.2 Optional commands
1.6.2.2.1 Download from master to slave (Block Mode)
1.6.2.2.2 Download from master to slave (fixed size)
1.6.2.2.3 Download from master to slave (short version)
1.6.2.2.4 Modify bits
1.6.3 Page switching commands (PAG)
1.6.3.1 Optional commands
1.6.3.1.1 Set calibration page
1.6.3.1.2 Get calibration page
1.6.3.1.3 Get general information on PAG processor
1.6.3.1.4 Get specific information for a SEGMENT
1.6.3.1.5 Get specific information for a PAGE
1.6.3.1.6 Set mode for a SEGMENT
1.6.3.1.7 Get mode for a SEGMENT
1.6.3.1.8 Copy page
1.6.4 Data Acquisition and Stimulation Commands (DAQ)
1.6.4.1 Basics
1.6.4.1.1 Mandatory commands
1.6.4.1.1.1 Set pointer to ODT entry
1.6.4.1.1.2 Write element in ODT entry
1.6.4.1.1.3 Set mode for DAQ list
1.6.4.1.1.4 Start /stop/select DAQ list
1.6.4.1.1.5 Start/stop DAQ lists (synchronously)
1.6.4.1.2 Optional commands
1.6.4.1.2.1 Write multiple elements in ODT
1.6.4.1.2.2 Read element from ODT entry
1.6.4.1.2.3 Get DAQ clock from slave
1.6.4.1.2.4 Get general information on DAQ processor
1.6.4.1.2.5 Get general information on DAQ processing resolution
1.6.4.1.2.6 Get mode from DAQ list
1.6.4.1.2.7 Get specific information for an event channel
1.6.4.2 Static DAQ list configuration (stat)
1.6.4.2.1 Mandatory command
1.6.4.2.1.1 Clear DAQ list configuration
49
52
53
55
56
56
58
60
62
63
66
67
69
70
73
73
74
75
75
75
77
77
78
79
80
81
81
81
82
83
84
86
89
90
91
92
92
92
92
93
94
96
97
98
98
99
100
101
105
107
109
112
112
112
6
XCP Version 1.1 Release
Part 2 - Protocol Layer Specification
1.6.4.2.2 Optional command
1.6.4.2.2.1 Get specific information for a DAQ list
1.6.4.3 Dynamic DAQ List Configuration (dyn)
1.6.4.3.1 Mandatory commands
1.6.4.3.1.1 Clear dynamic DAQ configuration
1.6.4.3.1.2 Allocate DAQ lists
1.6.4.3.1.3 Allocate ODTs to a DAQ list
1.6.4.3.1.4 Allocate ODT entries to an ODT
1.6.5 Non-volatile Memory Programming (PGM)
1.6.5.1 Mandatory commands
Indicate the beginning of a programming sequence
1.6.5.1.1
1.6.5.1.2 Clear a part of non-volatile memory
1.6.5.1.3 Program a non-volatile memory segment
1.6.5.1.4
Indicate the end of a programming sequence
1.6.5.2 Optional commands
1.6.5.2.1 Get general information on PGM processor
1.6.5.2.2 Get specific information for a SECTOR
1.6.5.2.3 Prepare non-volatile memory programming
1.6.5.2.4 Set data format before programming
1.6.5.2.5 Program a non-volatile memory segment (Block Mode)
1.6.5.2.6 Program a non-volatile memory segment (fixed size)
1.6.5.2.7 Program Verify
1.7 Communication Error Handling
1.7.1 Definitions
1.7.1.1 Error
1.7.1.2 Pre-action
1.7.1.3 Action
1.7.1.4 Error severity
1.7.2 Time-out Handling
1.7.2.1 Standard Communication Model
1.7.2.2 Block Communication Model
1.7.2.3 Interleaved Communication Model
1.7.2.4 Time-Out manipulation
1.7.2.4.1 Overruling Time-Out values
1.7.2.4.2 Restarting Time-Out detection
1.7.3 Error Code Handling
1.7.3.1 Table of Error Codes (ERR_*)
1.7.3.2 The Error Handling Matrix
1.7.3.2.1 Standard commands (STD)
1.7.3.2.2 Calibration commands (CAL)
1.7.3.2.3 Page switching commands (PAG)
1.7.3.2.4 Data Acquisition and Stimulation commands (DAQ)
1.7.3.2.5 Non-volatile memory programming commands (PGM)
1.8 Description of Events
1.8.1 Start in RESUME mode
1.8.2 End of DAQ clearing
1.8.3 End of DAQ storing
XCP Version 1.1 Release
113
113
115
115
115
116
117
118
119
119
119
121
123
125
126
126
129
131
132
134
135
136
137
137
137
138
139
140
141
141
142
143
144
144
145
146
147
148
148
150
151
153
156
158
158
159
160
7
Part 2 - Protocol Layer Specification
1.8.4 End of CAL storing
1.8.5 Request to restart time-out detection
1.8.6 Indication of DAQ overload
1.8.7 Indication of autonomous disconnect
1.8.8 Transfer of externally triggered timestamp
1.8.9 Indication of time-out at STIM
1.8.10 Entering SLEEP mode
1.8.11 Leaving SLEEP mode
1.8.12 User-defined event
1.8.13 Transport layer specific event
Interface to ASAM MCD 2MC description file
2
2.1 ASAM MCD 2MC AML for XCP (Common_Parameters)
161
162
163
164
165
166
167
168
169
170
171
171
8
XCP Version 1.1 Release