ASAM CCP V2.1.0 英文版
ASAM CCP V2.1.0 英文版
ASAM CCP V2.1.0 英文版
Version 2.1.0
Date: 1999-02-18
Base Standard
Disclaimer
Contents
1 Introduction.............................................................................................................1
1.1 ASAP................................................................................................................................................1
1.2 CAN Calibration Protocol (CCP)
...................................................................................................1
3 Related documents................................................................................................2
4 Revision history......................................................................................................2
6 Protocol definition..................................................................................................5
6.1 Generic Control Commands.........................................................................................................5
6.2 Data Acquisition Commands........................................................................................................5
7 Message Objects....................................................................................................6
7.1 Organisation of Message Objects
................................................................................................6
7.2 Description of Message Objects..................................................................................................7
7.2.1 Command Receive Object CRO..............................................................................................7
7.2.2 Data Transmission Object DTO...............................................................................................7
7.3 Organisation of Data Acquisition
.................................................................................................9
8 Version Mechanism..............................................................................................12
9 Version compatibility...........................................................................................12
12 Description of Commands.................................................................................15
12.1 Connect.......................................................................................................................................15
12.2 Exchange Station Identifications.............................................................................................16
12.3 Get Seed for Key........................................................................................................................18
12.4 Unlock Protection......................................................................................................................19
12.5 Set Memory Transfer Address
..................................................................................................20
12.6 Data Download...........................................................................................................................21
12.7 Data Download 6 Bytes.............................................................................................................22
12.8 Data Upload................................................................................................................................23
12.9 Short Upload...............................................................................................................................24
12.10 Select Calibration Data Page..................................................................................................25
12.11Get Size of DAQ list..................................................................................................................26
12.12 Set DAQ list pointer.................................................................................................................27
Page i
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
13 Error Handling....................................................................................................44
14 Example Sequences...........................................................................................45
14.1 Session log-in.............................................................................................................................45
14.2 Block DownLoad........................................................................................................................45
14.3 Block UpLoad.............................................................................................................................45
14.4 Calibration Data Initialization
....................................................................................................46
14.5 DAQ List Initialization................................................................................................................46
14.6 Code Update...............................................................................................................................46
16 Appendices.........................................................................................................48
16.1 Matrix of Error Codes................................................................................................................48
16.2 Broadcast Techniques in Multi-point Applications
................................................................49
Page ii
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
1 Introduction
1.1 ASAP
The ASAP task force (Arbeitskreis zur Standardisierung von Applikationssystemen; English
translation: Standardization of Application/Calibration Systems task force) has been
founded by the companies Audi AG, BMW AG, Mercedes-Benz AG, Porsche AG and
Volkswagen AG. European manufacturers of automation, test and development systems for
the automotive industry as well as manufacturers of electronic control units have joined this
task force.
The world of automotive technology has grown into complex electronic system
configurations to meet the increased requirements in the area of legislated exhaust gas
limits, environmental pollution protection, security systems, driving performance and body
equipment options. Some automotive manufacturers use in vehicle distributed control
systems supported by networks.
To develop this new generation of automotive electronics, new and high sophisticated
software, calibration, measurement and diagnosis equipment has to be used. At this time
almost no standards exist in the area of software interfaces for such devices. Each
company has its proprietary systems and interfaces to support the development of these
high end configurations.
The Controller Area Network CAN is a joint development of Robert Bosch GmbH and Intel
Corporation. CAN is used in many high-end automotive control systems like engine
management as well as in industrial control systems. Controller chips for CAN are available
from various semiconductor manufacturers.
The CAN Calibration Protocol is part of the ASAP standards. It was developed and
introduced by Ingenieurbüro Helmut Kleinknecht, a manufacturer of calibration systems,
and is used in several applications in the automotive industry. The CCP was taken over by
the ASAP working group and enhanced with optional functions.
Page 1
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
3 Related documents
Specifications and data sheets from Intel Corporation:
• 82527 Serial Communications Controller Datasheet (Intel #272250)
• 82527 Serial Communications Controller Architectural Overview (Intel #272410)
• Introduction to the Controller Area Network (CAN) Protocol (Intel #270962)
4 Revision history
Revision Date Item(s) changed Note
1.0 30 - Sep - 1992 Initial release from
Ingenieurbüro Helmut
Kleinknecht
1.01b 07 - Dec - 1995 Working draft, with the following optional ASAP work group
commands added
- EXCHANGE_ID
- GET_SEED
- UNLOCK
- GET_DAQ_SIZE
- SET_DAQ_PTR
- WRITE_DAQ
- ACTION_SERVICE
and the return / error codes
- Key request
- Session status request
- Cold start request
- Cal. data init. request
- DAQ list init. request
- code update request
- access locked
Page 2
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
Draft 2.1 23 - June - 1998 Chapter Version mechanismadded Result of ASAP work
Chapter Version compatibilityadded group meeting;
DOWNLOAD6 classed optional Document status:
SHORTUP classed optional Draft
Appendix Matrix of Error Codesadded
2. 1 18 - Feb - 1999 All changes Prop. 2.01 and Draft 2.1 Document status:
active. Release / public
Page 3
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
Message Object
A message transfered on the CAN, which is sent from a transmitting ECU to any
receiving / listening ECU. The coding of the data contained in the message is
"known" by the receiving ECUs. A message object's data can be 0 to 8 bytes.
Message Frame
Message Frame is a synonymous name for Message Object in the recent literature
on CAN.
Page 4
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
6 Protocol definition
The CAN Communication Protocol used for Calibration and Data Acquisition is a master-
slave type communication. A master device is connected with one or more slave devices on
the CAN:
Master
device
CAN
Page 5
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
7 Message Objects
7.1 Organisation of Message Objects
According to the definition of the CAN all messages and data to be transfered are packed
into "message objects", containing up to 8 byte of data. A message object is sent from one
CAN node to other CAN nodes.
The CCP requires at least two message objects, one for each direction:
1) Command Receive Object : CRO
2) Data Transmission Object : DTO
The CRO is used for reception of command codes and related parameters to carry out
internal functions or memory transfers between the logically connected CAN devices. The
reception of a command has to be prompted with a handshake message using the Data
Transmission Object DTO (see below), and in this case a DTO is called a Command
Return Message. The return code of this DTO message is used to determine whether the
corresponding command has been successfully completed or not.
CCP driver
Command DAQ
processor processor
Functional Diagram: Communication flow between CCP master and slave devices.
The assignment of message identifiers to the above described objects is defined in the
slave device description file (e.g. the ASAP2 format description file), which is used to
configure the master device. It is recommended that the bus priority of the message objects
is carefully determined in order to avoid injury to other real-time communication on the bus.
Also, the CRO should obtain higher priority than the DTO.
For all data transfered by the CCP no byte order for the protocol itself is defined. Because
the data organisation depends on the ECU’s CPU, the byte ordering is defined in the slave
device description file. The only exceptions are the station addresses in the TEST,
CONNECT and DISCONNECT commands.
Page 6
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
Type Rx only
Size 8 bytes message field
Purpose Reception of commands in the slave device
byte 0 1 2 3 4 5 6 7
CMD CTR
Parameter and data field
The data lenght code of the CRO must always be 8. Unused data bytes, marked as „don’t
care„ in the command descriptions, may have arbitrary values.
Structure of object:
Page 7
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
Meaning of PID
byte 0 1 2 3 4 5 6 7
PID ERR CTR
Parameter and Data Field
byte 0 1 2 3 4 5 6 7
PID
Data Field (DAQ values)
The data lenght code of the DTO may be set to the actual size.
Page 8
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
ECU
memory ODT List organization
ODT
0 address,length
Element
1 address,length
Element 2 address,length
Element 3 address,length
4 address,length
5 address,length
6 address,length
Data elements located in the ECU's memory are assigned to a list calledObject Descriptor Table
ODT. This table holds the address, the address extension and the length in bytes of each
element. The ODT can have up to 7 element references.
The contents of each element defined in this ODT has to be transfered into a DAQ Message DTO
to be sent to the master device. To save memory resources in the ECU, the address extension
and the lenght are optional. The elements have to be consistently sampled by the ECU. If a ECU
does not support element sizes more than 1 byte, the master device is required to split up
multibyte data object into single bytes. In this case, the ECU has to assure consistency for all
elements in a ODT.
Page 9
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
The PID is the number assigned to the ODT ( 0 ≤ n ≤ 0xFD). Typically several ODT are defined for
data acquisition from a slave device:
DAQ List #0
ODT #2 0 address,length
1 address,length
ODT #1 0 address,length
2 address,length
1 address,length
3 address,length
ODT #0 0 address,length
2 address,length
1 4 address,length
address,length
3 address,length PID=2 0 1 2 3 4 5 6
2 5 address,length
address,length
4 address,length
3 6 address,length
address,length PID=1 0 1 2 3 4 5 6
5 address,length
4 address,length
6 address,length PID=0 0 1 2 3 4 5 6
5 address,length
6 address,length
CCP allows the setup of a number of DAQ lists, which may be simultaneously active. The
sampling and transmission of the DTOs of each DAQ list is triggered by individual events in the
ECU. See the description of the START_STOP command.
When a DAQ list is triggered, the data for all or one ODTs (depending on the ECU
implementation) is sampled in a consistent way. The ECU may need some time to send the
sampled DTO messages on the bus. There are two possibilities for the ECU to react, when a new
event cycle is triggered before the transmission of the previous cycle has finished:
1. The transmission of the previous cycle is skipped.
Advantage: There are some ODTs of a DAQ-list missing and the tool is able to show this to
the user.
Problem: If those lacks occur frequently, there are some signals that are not measured at all.
2. The transmission of the new cycle is skipped.
Advantage: The received samples are always complete and the resulting acquisition raster is
reduced.
Problem: In case of event-triggered samples, the tool has no possibility to check the
plausibility of the acquisition-rate.
In addition, the ECU may transmit a „DAQ processor overload„ event message to inform the
master device. The ECU must take care not to overflow another cycle with this additional
message.
When defining the measuring component in the ECU, the developer should take care that the
sampled data can be transmitted via the CAN. The described mechanisms to react on overload,
should not need to be used while working in standard situation.
Page 10
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
1. Clear the current list in the ECU and let the ECU allocate memory for one DAQ list by sending
the command GET_DAQ_SIZE.
Following the GET_DAQ_SIZE command the ECU reports the available memory for ODTs in
the current DAQ list.
2. In a loop send
SET_DAQ_PTR with the parameters DAQ list number, ODT number, element number in
ODT
WRITE_DAQ with the parameters size of element, address extension, 32bit base address
until the ODT is complete and repeat this procedure for further ODTs.
Page 11
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
8 Version Mechanism
A version management mechanism is introduced with Version 2.1 of the CCP to reduce the
impact of version incompatibilites. The following policy applies:
Major protocol version number: The major protocol version number ranges from 0 to 255. A
change of this dimension is necessary if the syntax and sematics of existing commands for both
the memory transfer primitives and the data acquisition functions differ substantially from those
defined in the previous version. This implies that non-optional commands must not be altered in a
non backward compatible manner within the same major protocol version number.
Minor protocol version number: The minor protocol version number ranges from 0 to 9. A change
of this dimension is necessary if new optional commands are added / removed to / from the
protocol.
9 Version compatibility
To ensure a minimum compatibility between the master and the slave device the following policies
apply:
1. Communication between a master and a slave device is not possible if the major protocol
version numbers are not equal.
2. The master device must have at least have the same protocol version (major and minor
protocol version number) or higher than the slave device. The slave device is only required to
support one protocol version.
3. In order to ensure a full ASAP1a CCP conformity the master and the slave device must at
least support all non-optional commands.
Page 12
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
The following comands are optional, if the ECU does not support DAQ:
GET_DAQ_SIZE,
SET_DAQ_PTR,
WRITE_DAQ,
START_STOP.
Page 13
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
If errors occur asynchroneously to protocol commands, the CCP slave device may also
directly invoke appropriate error handling by sending error codes as Event Messages
(Packet ID 0xFE).
Categories of errors:
Page 14
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
12 Description of Commands
In this chapter all commands with their parameters and the expected return information are
explained, including an example for each command.
12.1 Connect
Example
The master device sends a CONNECT CRO to the slave device with the station address
0x0200. The command counter CTR currently is 0x45:
byte 0 1 2 3 4 5 6 7
0x01 0x45 0x00 0x02 -- -- -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00) and the CTR of
the CRO:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x45 -- -- -- -- --
Page 15
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
The CCP master and slave stations exchange IDs for automatic session
configuration. This might include automatic assignment of a data acquisition
setup file depending on the slave's returned ID (Plug´n´Play). The following
return information is expected (contents of returned DTO:)
The slave device automatically sets the Memory Transfer Address 0 (MTA0) to
the location from which the CCP master may subsequently upload the requested
ID using UPLOAD. See also the SET_MTA and UPLOAD command
description.
Page 16
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
Resource Availabilty Mask / Resource Protection Status Mask format, for simplification in
the following just referred to as resource mask.
Bit 7 6 5 4 3 2 1 0
x PGM x x X X DAQ CAL
CAL Calibration
DAQ Data Acquisition
PGM Memory programming
x reserved for future use
Example
The master device sends a EXCHANGE_ID CRO to the slave device. The command
counter CTR currently is 0x23:
byte 0 1 2 3 4 5 6 7
0x17 0x23 -- -- -- -- -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00), the CTR of the
CRO, the length of the slave ID and its data type:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 0x04 0x02 0x03 0x03 --
The length of the slave ID is 4 bytes, the data type is coded as type 2. The resource
availabitity mask is 0x03, the resource protection status mask is 0x03. The data can be
fetched from the slave using UPLOAD.
Page 17
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
Returns ´seed´ data for a seed&key algorithm for computing the ´key´ to
unlock the requested function for authorized access (see 'Unlock Protection'
below).
The following return information is expected (Contents of returned DTO:)
Example
The master device sends a GET_SEED CRO to the slave device. The command counter
CTR currently is 0x23. The task is data acquisition :
byte 0 1 2 3 4 5 6 7
0x12 0x23 0x02 -- -- -- -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00), the CTR of the
CRO, the protection status and the 'seed' data:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 0x01 0x14 0x15 0x16 0x17
The protection status is TRUE (0x01), the seed data are 0x14, 0x15, 0x16, 0x17.
Page 18
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
Unlocks the slave devices security protection (if applicable) using a ´key´ computed from
´seed´. See seed&key above.
The following return information is expected (Contents of returned DTO:)
Example
The master device sends an UNLOCK CRO to the slave device. The command counter
CTR currently is 0x23 and the key found with GET_SEED is used:
byte 0 1 2 3 4 5 6 7
0x13 0x23 0x14 0x15 0x16 0x17 -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00), the CTR of the
CRO, and the privilege status:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 0x02 -- -- -- --
Page 19
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
This command will initialize a base pointer (32Bit + extension) for all following memory
transfers. The address extension depends on the slave controller's organization and may
identify a switchable memory bank or a memory segment.
The MTA number (handle) is used to identify different transfer address locations (pointers).
MTA0 is used by the commands DNLOAD, UPLOAD, DNLOAD_6 , SELECT_CAL_PAGE,
CLEAR_MEMORY, PROGRAM and PROGRAM_6. MTA1 is used by the MOVE command.
See also command ‘MOVE’.
Example
The master device sends a SET_MTA CRO to the slave device. The command counter
CTR currently is 0x23, the MTA0 number is 0, the address extension is 0x02 and the base
address is 0x34002000:
byte 0 1 2 3 4 5 6 7
0x02 0x23 0x00 0x02 0x34 0x00 0x20 0x00
The slave device answers with a DTO containing ACKNOWLEDGE (0x00) and the CTR of
the CRO:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 -- -- -- -- --
Page 20
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
The data block of the specified length (size) contained in the CRO will be copied into
memory, starting at the current Memory Transfer Address 0 (MTA0). The MTA0 pointer will
be post-incremented by the value of 'size'.
The following return information is expected (Contents of returned DTO:)
Example
The master device sends a DNLOAD CRO to the slave device. The command counter CTR
currently is 0x23, the size of data is 0x05 and the data to be transferred is 0x10, 0x11, 0x12,
0x13, 0x14:
byte 0 1 2 3 4 5 6 7
0x03 0x23 0x05 0x10 0x11 0x12 0x13 0x14
The slave device answers with a DTO containing ACKNOWLEDGE (0x00), the CTR of the
CRO, the memory transfer address extension 0x02 and the (incremented) current MTA0
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 0x02 0x34 0x00 0x20 0x05
Before execution of this command the MTA0 had been 0x34002000 and was incremented
by 5.
Page 21
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
The data block with the fixed length (size) of 6 bytes contained in the CRO will be copied
into memory, starting at the current Memory Transfer Address0 (MTA0). The MTA0 pointer
will be post-incremented by the value 6.
The following return information is expected (Contents of returned DTO:)
Example
The master device sends a DNLOAD_6 CRO to the slave device. The command counter
CTR currently is 0x25, the size of data is 0x05 and the data to be transferred is 0x10, 0x11,
0x12, 0x13, 0x14, 0x15:
byte 0 1 2 3 4 5 6 7
0x23 0x25 0x10 0x11 0x12 0x13 0x14 0x15
The slave device answers with a DTO containing ACKNOWLEDGE (0x00), the CTR of the
CRO, the memory transfer address extension 0x02 and the (incremented) current MTA0
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x25 0x02 0x34 0x00 0x20 0x06
Before execution of this command the MTA0 had been 0x34002000 and was incremented
by 6.
Page 22
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
Example
The master device sends an UPLOAD CRO to the slave device. The command counter
CTR currently is 0x23, the size of data is 0x04:
byte 0 1 2 3 4 5 6 7
0x04 0x23 0x04 -- -- -- -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00), the CTR of the
CRO and the requested data bytes:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 0x10 0x11 0x12 0x13 --
Page 23
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
A data block of the specified length (size), starting at source address will be copied into the
corresponding DTO data field. The MTA0 pointer remains unchanged.
Example
The master device sends a SHORT_UP CRO to the slave device. The command counter
CTR currently is 0x23, the size of data is 0x04 and the source adress is 0x12345678:
byte 0 1 2 3 4 5 6 7
0x0F 0x23 0x04 0x00 0x12 0x34 0x56 0x78
The slave device answers with a DTO containing ACKNOWLEDGE (0x00), the CTR of the
CRO and the requested data bytes:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 0x10 0x11 0x12 0x13 --
Page 24
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
This command's function depends on the ECU implementation. The previously initialized
MTA0 points to the start of the calibration data page that is selected as the currently active
page by this command.
Example
The master device sends first a SET_MTA CRO and now a SELECT_CAL_PAGE CRO to
the slave device. The command counter CTR currently is 0x23.
byte 0 1 2 3 4 5 6 7
0x11 0x23 -- -- -- -- -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00) and the CTR of
the CRO:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 -- -- -- -- --
Using two blocks of ECU memory for calibration, the SET_MTA and the
SELECT_CAL_PAGE commands can be used for a kind of 'emergency interrupt' from the
master device in order to bring the slave system into a 'safe state' by preparing the change
of these two memory blocks with the SET_MTA command and executing the change
immediately with SELECT_CAL_PAGE.
Page 25
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
12.11Get
12.11Get Size of DAQ list
Returns the size of the specified DAQ list as the number of available Object
DescriptorTables (ODTs) and clears the current list. If the specified list number is not
available, size = 0 should be returned. The DAQ list is initialized and data acquisition by this
list is stopped.
An individual CAN Identifier may be assigned to a DAQ list to configure multi ECU data
acquisition. This feature is optional. If the given identifier isn’t possible, an error code is
returned. 29 bit CAN identifiers are marked by the most significant bit set.
Example
The master device sends a GET_DAQ_SIZE CRO to the slave device. The command
counter CTR currently is 0x23, the DAQ list number is 0x03 with the ID 0x01020304.
byte 0 1 2 3 4 5 6 7
0x14 0x23 0x03 -- 0x01 0x02 0x03 0x04
The slave device answers with a DTO containing ACKNOWLEDGE (0x00), the CTR of the
CRO, the first PID=0x08 and the list size 0x10 (10 ODT with up to 7 elements each)
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 0x10 0x08 -- -- --
Page 26
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
Initializes the DAQ list pointer for a subsequent write to a DAQ list.
See also 'Organization of Data Acquisition Messages'.
Example
The master device sends a SET_DAQ_PTR CRO to the slave device. The command
counter CTR currently is 0x23, the DAQ list number is 0x03, the ODT number is 0x05 and
the element number addressed is 0x02.
byte 0 1 2 3 4 5 6 7
0x15 0x23 0x03 0x05 0x02 -- -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00) and the CTR of
the CRO:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 -- -- -- -- --
Next the command WRITE_DAQ is used to set the data elements in the selected ODT.
Page 27
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
Writes one entry (description of single DAQ element) to a DAQ list defined by the DAQ list
pointer (see SET_DAQ_PTR). The following DAQ element sizes are defined: 1 byte , 2
bytes (type word), 4 bytes (type long / Float).
An ECU may not support individual address extensions for each element and 2 or 4 byte
element sizes. It is the responsibility of the master device to care for the ECU limitations.
The limitations may be defined in the slave device description file (e.g. ASAP2).
It is the responsibility of the slave device, that all bytes of a DAQ element are consistent
upon transmission.
See also 'Organization of Data Acquisition Messages'.
Example
The master device sends an WRITE_DAQ CRO to the slave device. The command counter
CTR currently is 0x23, the size of the DAQ element is 0x02 bytes, the address extension is
0x01 and the 32-bit address is 0x02004200.
byte 0 1 2 3 4 5 6 7
0x16 0x23 0x02 0x01 0x02 0x00 0x42 0x00
The slave device answers with a DTO containing ACKNOWLEDGE (0x00) and the CTR of
the CRO:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 -- -- -- -- --
Page 28
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
This command is used to start or to stop the data acquisition or to prepare a synchronized
start of the specified DAQ list. The Last ODT number specifies which ODTs (From 0 to
Last ODT number) of this DAQ list should be transmitted. The Event Channel No.
specifies the generic signal source that effectively determines the data transmission timing.
To allow reduction of the desired transmission rate, a prescaler may be applied to the
Event Channel. The prescaler value factor must be greater than or equal to 1.
The mode parameter is defined as follows: 0x00 stops specified DAQ list, 0x01 starts
specified DAQ list, 0x02 prepares DAQ list for synchronised start.
The start/stop mode parameter = 0x02 (prepare to start data transmission) configures the
DAQ list with the provided parameters but does not start the data acquisition of the
specified list. This parameter is used for a synchronized start of all configured DAQ lists. In
case the slave device is not capable of performing the synchronized start of the data
acquisition, the slave device may then start data transmission if this parameter is TRUE
(not zero).
The ECU specific properties of event channels and DAQ lists may be described in the slave
device description (ASAP2).
Example
The master device sends a START_STOP CRO to the slave device. The command counter
CTR currently is 0x23, the start/stop byte is 0x01 (start), the DAQ list number is 0x03and
the packet number to transmit is 0x07. The ECU shell use the event-channel 0x02 with a
prescaler of 1 (motorola-format).
byte 0 1 2 3 4 5 6 7
0x06 0x23 0x01 0x03 0x07 0x02 0x00 0x01
The slave device answers with a DTO containing ACKNOWLEDGE (0x00) and the CTR of
the CRO:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 -- -- -- -- --
Page 29
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
12.15 Disconnect
Disconnects the slave device. The disconnect can be temporary, setting the slave device in
an "off line" state or with parameter 0x01 terminating the calibration session.
Terminating the session invalidates all state information and resets the slave protection
status.
A temporary disconnect doesn’t stop the transmission of DAQ messages. The MTA values,
the DAQ setup, the session status and the protection status are unaffected by the
temporary disconnect and remain unchanged.
If the ECU supports the resume feature and the resume bit was set with a
SET_SESSION_STATUS command, the DAQ related functions behave like in a temporary
disconnect. The protections status for DAQ remains unlocked.
Station address is specified as a number in little-endian byte order (Intel format, low byte
first).
Example
The master device sends a DISCONNECT CRO to the slave device. The command counter
CTR currently is 0x23, the parameter byte is 0x00 (temporary) and the slave device address
is 0x0208.
byte 0 1 2 3 4 5 6 7
0x07 0x23 0x00 -- 0x08 0x02 -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00) and the CTR of
the CRO:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 -- -- -- -- --
Page 30
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
Keeps the slave node informed about the current state of the calibration session (see also
chapter 'Error Handling').
Session Status:
Bit 7 6 5 4 3 2 1 0
RUN STORE res res res RESUME DAQ CAL
Example
The master device sends a SET_S_STATUS CRO to the slave device. The command
counter CTR currently is 0x23, the session status bits are 10000001 (RUN, CAL).
byte 0 1 2 3 4 5 6 7
0x0C 0x23 0x81 -- -- -- -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00) and the CTR of
the CRO:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 -- -- -- -- --
Page 31
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
Note: the use of additional status information is manufacturer and / or project specific, it
is not part of this protocol specification. For example, additional status information could
contain an incremental checksum result, that keeps track of the current session activities.
If the return information does not contain additional status information, the additional
status information qualifier has to be FALSE (0). If the additional status information is not
FALSE, it may be used to determine the type of additional status information.
Example
The master device sends a GET_S_STATUS CRO to the slave device. The command
counter CTR currently is 0x23.
byte 0 1 2 3 4 5 6 7
0x0D 0x23 -- -- -- -- -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00), the CTR of the
CRO and the session status bits:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 0x81 -- -- -- --
The session status is bit 0 set (CAL) and bit 7 set (RUN).
Page 32
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
Example
The master device sends a BUILD_CHKSUM CRO to the slave device. The command
counter CTR currently is 0x23, the block size is 32 kbytes (0x8000).
byte 0 1 2 3 4 5 6 7
0x0E 0x23 0x00 0x00 0x80 0x00 -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00), the CTR of the
CRO and the calculated checksum 0x1234.
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 0x02 0x12 0x34 -- --
Page 33
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
This command may be used to erase FLASH EPROM prior to reprogramming.The MTA0
pointer points to the memory location to be erased.
Example
The master device sends a CLEAR_MEMORY CRO to the slave device. The command
counter CTR currently is 0x23, the block size is 32 kbytes (0x8000).
byte 0 1 2 3 4 5 6 7
0x10 0x23 0x00 0x00 0x80 0x00 -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00) and the CTR of
the CRO:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 -- -- -- -- --
Page 34
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
12.20 Program
The data block of the specified length (size) contained in the CRO will be programmed into
non-volatile memory (FLASH, EEPROM), starting at current MTA0. The MTA0 pointer will
be post-incremented by the value of ‘size’.
Example
The master device sends a PROGRAM command to the slave device. The command
counter CTR currently is 0x23, the size is 3 bytes (0x03) and the data to be programmed is
0x10, 0x11, 0x12:
byte 0 1 2 3 4 5 6 7
0x18 0x23 0x03 0x10 0x11 0x12 -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00) and the CTR of
the CRO, the memory transfer address extension 0x02 and the (incremented) current
MTA0
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 0x02 0x34 0x00 0x20 0x03
Before execution of this command the MTA0 had been 0x34002000 and was incremented
by 3.
Page 35
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
The data block with the length (size) of 6 bytes contained in the CRO will be programmed
into non-volatile memory (FLASH, EEPROM), starting at current MTA0. The MTA0 pointer
will be post-incremented by 6.
Example
The master device sends a PROGRAM command to the slave device. The command
counter CTR currently is 0x23, the size is 6 bytes and the data to be programmed is 0x10,
0x11, 0x12, 0x13, 0x14, 0x15:
byte 0 1 2 3 4 5 6 7
0x22 0x23 0x10 0x11 0x12 0x13 0x14 0x15
The slave device answers with a DTO containing ACKNOWLEDGE (0x00) and the CTR of
the CRO, the memory transfer address extension 0x02 and the (incremented) current
MTA0
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 0x02 0x34 0x00 0x20 0x06
Before execution of this command the MTA0 had been 0x34002000 and was incremented
by 6.
Page 36
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
A data block of the specified length (size) will be copied from the address defined by MTA 0
(source pointer) to the address defined by MTA 1 (destination pointer).
Example
The master device sends a MOVE CRO to the slave device. The command counter CTR
currently is 0x23, the number of bytes to move is 32 kbytes (0x8000).
byte 0 1 2 3 4 5 6 7
0x19 0x23 0x00 0x00 0x80 0x00 -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00) and the CTR of
the CRO:
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 -- -- -- -- --
Page 37
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
The slave device carries out the requested service and automatically sets the Memory
Transfer Address MTA0 to the location from which the CCP master device (host) may
subsequently upload the requested diagnostic service return information.
The following handshake is expected (Contents of returned DTO:)
Example
The master device sends a DIAG_SERVICE CRO to the slave device. The command
counter CTR currently is 0x23, the requested diagnostic service number is 0x08 and has no
parameters.
byte 0 1 2 3 4 5 6 7
0x20 0x23 0x08 -- -- -- -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00), the CTR of the
CRO, the length of return information 0x20 and the data type 0x00.
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 0x20 0x00 -- -- --
The diagnostic service data now can be uploaded from the MTA0. See UPLOAD.
Page 38
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
The slave device carries out the requested service and automatically sets the Memory
Transfer Address MTA0 to the location from which the CCP master device may
subsequently upload the requested action service return information (if applicable).
Example
The master device sends an ACTION_SERVICE CRO to the slave device. The command
counter CTR currently is 0x23, the requested action service number is 0x08 and has the
parameter 0x05.
byte 0 1 2 3 4 5 6 7
0x20 0x23 0x08 0x05 -- -- -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00), the CTR of the
CRO, the length of return information 0x20 and the data type 0x00.
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x23 0x20 0x00 -- -- --
The resulting action service data now can be uploaded from the MTA0. See UPLOAD.
Page 39
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
This command is used to test if the slave with the specified station address is
available for CCP communication. This command does not establish a logical
connection nor does it trigger any activities in the specified slave. Station
address is specified as a number in little-endian byte order (Intel format, low
byte first).
Page 40
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
This command is used to start the periodic transmission of all DAQ lists
configured with the previously sent START_STOP command (start/stop modus
= 2) as „prepared to start“ in a synchronized manner. The command is used to
stop the periodic transmission of all DAQ lists, including those not started
synchronized.
Page 41
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
This command returns the start address of the calibration page that is currently active in the
slave device.
Page 42
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
This command performs a mutual identification of the protocol version used in the
master and in the slave device to aggree on a common protocol version. This
command is expected to be executed prior to the EXCHANGE_ID command.
The following return information is expected (Contents of returned DTO:)
Example
The master device sends a GET_CCP_VERSION command to the slave device. The
command counter CTR currently is 0x27, the desired Main protocol version is 2, the
Release within Main version 2 is 1, i.e. the desired protocol version is CCP 2.1 .
byte 0 1 2 3 4 5 6 7
0x1B 0x27 0x02 0x01 -- -- -- --
The slave device answers with a DTO containing ACKNOWLEDGE (0x00), the CTR of the
CRO, the CCP version as implemented in the slave device again is CCP 2.1.
byte 0 1 2 3 4 5 6 7
0xFF 0x00 0x27 0x02 0x01 -- -- --
Page 43
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
13 Error Handling
Calibration session state diagram and error handling procedures
The state diagram shows the state transitions and the possible error categories. The table
below shows the action taken after these error conditions.
COLD
START ALL
CLEAR
Cold Start
CAL
FAULT C2=20
Warm Start CAL. Data DAQ List
Initialization Initialization
C3
C2 CAL
EXIT RUN
SESSION DAQ
RUNNING RUN
RUN
STORE
Within the state 'Calibration data initialization', 'DAQ list initialization' or 'Session running' the
CCP master device may request to repeat embedded seed&key procedures.
The error category C1 is handled by a retry and does not lead into a state change.
Page 44
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
14 Example Sequences
Sequences
For some commonly implemented services the procedures using CCP are explained. This
only shall be considered as an example on the useage of the CCP. The settings of the
session status byte are described in the following form:
(01xx xx1x) means: x bit remains unchanged; 0/1 bit is forced 0/1
Macro service sequences are terminated if unresolvable errors (Category 3) occur.
Page 45
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
This procedure may also be embedded in a service used for programming of a FLASH
EPROM.
Page 46
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
With a baudrate of 500 kbit/s and typical load conditions for the bus and for the nodes
(ECU´s) the following ratings have been achieved:
Page 47
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
16 Appendices
In this Appendix additional information on the use and implementation of the CCP is given.
Page 48
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
CAN Calibration Protocol
Version 2.1, 18-feb-99
In certain multi-point applications it might be useful to carry out commands in more than one
slave device simultaneously. Although the CCP master-slave command protocol has been
designed to work point-to-point with only one slave connected at a time, there are several
approaches for broadcasting protocol commands to more than one slave station.
Page 49
Licensed to Zhejiang University
Downloaded by 21327078@zju.edu.cn on 17.08.2014
E-mail: support@asam.net
Internet: www.asam.net