Section outline
-
-
-
XCP requests, like the SHORT_UPLOAD command, can be used to read specific cells of the internal memory of an ECU. These commands will be used to measure signals directly from the internal memory, as you will learn in the second chapter. On the other hand, data can also be written back into the internal memory, e.g. by using a DOWNLOAD command.
XCP connections are point-to-point connections between a Master (e.g. a measurement and calibration tool like CANape) and a Slave (the XCP driver of an ECU). Communication is always established by the Master. The Master will send a XCP command inside the Data Field of a transport layer frame of the existing network. The type of command is transferred in the first byte of the XCP message as a Package Identifier (PID). The following bytes of the message contain information needed by the slave to execute the command. E.g. an address and the number of memory cells to be read out by the slave. The XCP slave answers either with a positive response or a negative response. A positive response may contain additional data, e.g. the requested information. A negative response will carry an error code.
The PIDs and structure of XCP commands and their responses are described in ASAM’s specification of the XCP protocol. The protocol also describes the structure of XCP frames in a CAN, a FlexRay, a Ethernet network etc. Measurement and calibration tasks will be implemented using the same XCP commands in different transport layers. Simply the transport layer frames carrying the corresponding XCP commands will change.
In the case of XCP on CAN, each Master-Slave-pair will communicate with a fixed set of IDs, e.g. CANape will use the CAN-ID 200 and the ECU the CAN-ID 201 for their XCP communication. In case a second Master-Slave-pair exists, a different set of fixed CAN-IDs will be used.
In the next chapter you will learn about how XCP commands are used to provide cyclical measurement modes.