The Universal Measurement and Calibration Protocol (XCP) is used during ECU development to access measurement and calibration data. A measurement and calibration tool acts as the XCP master, while the ECU contains an XCP slave implementation. The protocol can operate over different transport layers, including CAN and Ethernet, depending on the ECU and tool configuration.

XCP helps engineers observe internal ECU variables and adjust approved calibration parameters without changing the application source code for every experiment. The A2L description provides the metadata that allows a tool to interpret measurement and calibration objects correctly.

This guide explains the XCP architecture, transport choices, A2L files, DAQ measurement, stimulation, calibration access, bandwidth planning and a controlled calibration workflow. Exact commands, optional features, security mechanisms and memory behavior depend on the XCP version, ECU implementation, transport and project configuration. Confirm them against the applicable ASAM specification, ECU documentation and tool manual.

1. Why XCP is used in ECU development

An ECU contains software variables that represent sensor values, estimated states, control requests, diagnostic states and calibration parameters. During development, engineers often need to observe these values while the ECU is running.

Without a measurement protocol, engineers may need temporary software instrumentation, additional communication messages or special debug builds. XCP provides a standardized approach for supported measurement and calibration access.

Typical uses include:

  • Measuring internal variables during software development and vehicle testing.
  • Recording control algorithm inputs, intermediate values and outputs.
  • Evaluating calibration changes against vehicle behavior.
  • Adjusting approved calibration parameters during development.
  • Investigating timing, state-transition and control-performance issues.
  • Capturing data for analysis and regression comparison.

XCP is not a replacement for vehicle-network diagnostics such as UDS. UDS is commonly used for diagnostic services, programming and diagnostic data access, while XCP is designed for measurement and calibration workflows. Their use cases can coexist in an ECU development environment.

2. XCP architecture: master and slave

XCP uses a master-slave communication model.

  • XCP master: usually a PC-based measurement and calibration tool. It sends commands, configures measurement acquisition and displays or records data.
  • XCP slave: the XCP protocol implementation integrated into the ECU software. It processes commands and provides access to configured measurement and calibration objects.
  • Transport layer: carries XCP communication between the master and slave. Examples include XCP on CAN (XCP-on-CAN) and XCP on Ethernet (XCP-on-Ethernet).
  • A2L description: informs the master about the ECU objects, data types, addresses, conversions and relevant acquisition metadata.
Rendering diagram...

The XCP slave is not necessarily a separate hardware device. It is generally implemented as ECU software and interacts with the application's measurement and calibration objects through the ECU's memory and software integration.

3. XCP protocol layers and transport options

XCP separates protocol behavior from the transport mechanism. The protocol defines the command and data-exchange model; the selected transport determines how those messages are carried.

XCP on CAN

XCP-on-CAN carries XCP communication using CAN frames. It is useful when the ECU exposes an available CAN channel for development measurement and calibration.

Important considerations:

  • CAN frame payload limits constrain how data is packed.
  • Bus load is shared with other CAN communication.
  • The configured CAN identifier(s), addressing and connection settings must match the ECU and tool.
  • High-rate measurement of many signals can consume significant bus capacity.
  • CAN FD may offer a larger data field where supported by the complete ECU, tool and transport configuration.

XCP on Ethernet

XCP-on-Ethernet carries XCP communication over Ethernet, commonly using TCP or UDP according to the implementation and configuration.

Important considerations:

  • Ethernet generally offers more bandwidth than classic CAN.
  • The tool and ECU must use matching network addressing and transport settings.
  • UDP and TCP have different delivery and connection characteristics.
  • Network topology, switches, routing, firewall settings and interface configuration can affect connectivity.
  • Higher available bandwidth does not eliminate ECU CPU, memory or acquisition-event limits.
ConsiderationXCP on CANXCP on Ethernet
Transport mediumCAN / CAN FD where supportedEthernet
Typical constraintBus load and frame payloadNetwork configuration and ECU processing
High-rate acquisitionCan be constrained by bus capacityOften provides more bandwidth
Setup checksCAN channel, bitrate, identifiers and bus stateIP address, port, transport and network path
Key cautionAvoid excessive bus utilizationAvoid assuming network bandwidth equals ECU acquisition capacity

The actual performance depends on the ECU implementation, transport configuration, selected signals, event rates and competing traffic. Select the transport based on measured requirements rather than assuming one is always suitable.

4. What is an A2L file?

An A2L file is a textual description in the ASAM MCD-2 MC (ASAP2) format. It describes measurement and calibration objects so that a compatible tool can locate and interpret them.

Depending on the ECU description, an A2L can contain:

  • Measurement object names and memory addresses.
  • Data types, dimensions and record layouts.
  • Conversion methods, units and display formats.
  • Calibration parameter definitions and limits.
  • Memory segments and address extensions.
  • Measurement event and acquisition-related information.
  • Interface and protocol configuration information, where defined by the description and tool workflow.

An A2L file does not normally contain the live measurement values. It describes how the tool should interpret objects that are accessed from the ECU.

Example of why A2L metadata matters

Suppose an ECU variable represents motor speed. The raw memory value may be an integer, while the engineering value is expressed in revolutions per minute. The tool needs the correct address, datatype, byte order and conversion method to display the physical value correctly.

If the A2L does not match the ECU software, the tool may show an incorrect value, read an unrelated memory location or fail to access the object.

A2L and ECU software compatibility

Always verify that the A2L belongs to the exact software and memory layout being measured. A reliable configuration record should identify:

  • ECU hardware and software version.
  • A2L version or revision.
  • Calibration dataset version.
  • Compiler/linker and build baseline where relevant.
  • XCP transport and connection configuration.
  • Tool version and project configuration.

5. Connecting an XCP master to an ECU

A typical connection workflow is:

  1. Select the correct ECU project and matching A2L description.
  2. Configure the transport, such as CAN or Ethernet.
  3. Configure the required channel, addressing, identifier or network parameters.
  4. Connect to the ECU's XCP slave.
  5. Read identification information supported by the implementation.
  6. Apply the required access protection or authorization procedure.
  7. Confirm that the expected measurement and calibration objects are available.
Rendering diagram...

A successful transport connection does not automatically mean that every memory object is readable or writable. Object availability and access permissions are controlled by the ECU implementation and project configuration.

6. Measurement using DAQ

DAQ (Data Acquisition) is the XCP mechanism commonly used to acquire measurement values from the ECU. The master configures the acquisition, and the ECU sends measurement data according to configured events and resources.

The configuration commonly involves:

  • Selecting measurement objects from the A2L.
  • Defining DAQ lists and their entries (ODTs and entries, as applicable to the protocol version and implementation).
  • Associating acquisition with supported event channels.
  • Configuring the required prescalers or event behavior where supported.
  • Starting and stopping acquisition.
  • Recording timestamps and checking for lost or delayed data.

DAQ data flow

Rendering diagram...

DAQ terminology

  • DAQ list: a configured collection of measurement data to be acquired.
  • ODT (Object Descriptor Table): organizes the data elements transmitted for a DAQ list.
  • ODT entry: represents a measurement element included in an ODT.
  • Event channel: identifies an ECU event or timing source that triggers acquisition.
  • Prescaler: where supported, controls how frequently an event triggers acquisition relative to the base event.

The exact DAQ resource limits, configuration sequence and supported modes depend on the XCP version and slave implementation.

7. Measurement events and sample timing

DAQ acquisition is associated with ECU events. These may correspond to periodic tasks, time bases or other supported software events.

For example, a powertrain ECU might expose:

  • A fast control-loop event.
  • A slower supervisory task event.
  • A diagnostic or background event.

Selecting an event with a faster rate can increase the amount of measurement data and the processing load. A measurement request is not proof that the ECU delivered every sample at the requested rate.

During analysis, check:

  • The event's actual execution frequency.
  • The number and size of selected signals.
  • Transport bandwidth and competing traffic.
  • ECU CPU and memory impact.
  • Timestamp behavior and synchronization.
  • Lost, delayed or overrun indications provided by the tool or implementation.

8. STIM: stimulation of ECU variables

STIM (Stimulation) is a supported XCP capability that allows values to be supplied to the ECU in configured measurement and calibration setups. Instead of only observing ECU variables, the development tool can provide values that the ECU software consumes at defined points.

Potential development uses include:

  • Supplying controlled test values to an algorithm.
  • Evaluating behavior under repeatable input conditions.
  • Testing calibration or control logic without relying on a physical sensor stimulus in every experiment.

STIM support is implementation-dependent. It requires appropriate ECU software integration, object configuration, event handling and tool support. It must not be assumed to be available merely because an ECU supports basic XCP measurement.

9. Calibration parameters and write access

Calibration parameters are values used by ECU software to tune behavior without modifying the application code for every adjustment. Examples may include thresholds, gains, offsets, maps and lookup-table values.

A calibration tool may read and, when authorized, write supported calibration objects through XCP.

A controlled calibration process should:

  1. Identify the exact parameter and its engineering meaning.
  2. Confirm the correct A2L object, datatype, conversion and limits.
  3. Check the ECU's access protection and memory-segment rules.
  4. Record the original value and calibration dataset version.
  5. Change only approved parameters within defined limits.
  6. Observe ECU behavior and collect measurement evidence.
  7. Save or commit changes using the ECU's defined persistence mechanism, if supported.
  8. Compare the result with the baseline and retain the change record.

Do not write arbitrary memory addresses or treat every measurement object as writable. The A2L, ECU access configuration and project authorization define which objects can be calibrated.

10. Calibration memory and persistence

A calibration value visible during a session may be held in RAM, flash or another memory region depending on the ECU architecture and calibration strategy.

A value changing in the tool does not necessarily mean it has been permanently stored. Some ECUs support temporary RAM calibration during development; persistence may require a separate ECU-specific save, programming or NVM commit procedure.

Before power cycling, determine:

  • Whether the change is temporary or persistent.
  • Which memory segment contains the parameter.
  • Whether a save or commit operation is required.
  • Whether the ECU validates the parameter at startup.
  • How the original dataset can be restored.
  • Whether the calibration change is permitted in the current test environment.

Always follow the ECU supplier's procedure. Do not assume a generic XCP write operation commits a value to non-volatile memory.

11. Bandwidth and resource planning

A large DAQ configuration can overload the transport or consume excessive ECU resources. Estimate the required data rate before enabling many high-rate signals.

A first-order payload estimate is:

Rpayload=∑i=1nfi×siR_{\text{payload}} = \sum_{i=1}^{n} f_i \times s_i

where:

  • (f_i) is the acquisition frequency of signal (i), in samples per second.
  • (s_i) is the transmitted size of that signal, in bytes.
  • (n) is the number of acquired signals.

The estimate excludes protocol framing, timestamps, packet headers, padding, retransmission or other transport overhead. Actual traffic can therefore be higher.

Example

Assume a measurement setup contains:

  • 8 signals of 4 bytes each at 100 Hz.
  • 4 signals of 2 bytes each at 50 Hz.

The estimated raw payload rate is:

(8×4×100)+(4×2×50)=3,600 bytes/s(8 \times 4 \times 100) + (4 \times 2 \times 50) = 3{,}600 \text{ bytes/s}

This is only the signal payload estimate. Add protocol and transport overhead, and confirm the actual rate using the measurement tool and bus or network analysis.

Bandwidth is not the only limit. DAQ processing can also consume CPU time, RAM, queue resources and event-processing capacity inside the ECU.

12. Security and access protection

ECU measurement and calibration access can expose internal state and allow changes to software-controlled behavior. Access must therefore be managed according to the ECU program's security and development rules.

Depending on the implementation, access may involve:

  • XCP protection or authorization mechanisms.
  • Restricted memory segments or object permissions.
  • Development-only enablement.
  • Secure development networks and controlled physical access.
  • Calibration approval, audit records and dataset traceability.

Do not assume that a connected XCP master has unrestricted access. Do not bypass access controls or use development access on a production vehicle without explicit authorization and an approved procedure.

13. Practical example: measuring and tuning a motor-speed controller

Consider an ECU controlling an electric motor. Engineers want to observe speed-control behavior and tune an approved proportional gain during bench testing.

A controlled workflow could be:

  1. Load the A2L matching the ECU software.
  2. Connect to the ECU using the configured XCP transport.
  3. Select the speed request, measured speed, control error and controller output as measurement objects.
  4. Configure DAQ acquisition using the appropriate control-loop event.
  5. Start measurement and apply a repeatable speed-request profile.
  6. Review the recorded response, timing and any lost-sample indications.
  7. If authorized, adjust the proportional gain within the approved calibration range.
  8. Repeat the same test profile and compare response, overshoot, settling time and control effort.
  9. Restore or save the calibration according to the test plan.
  10. Record the ECU software, A2L, calibration dataset and test result.
Rendering diagram...

The example illustrates the measurement and calibration workflow. Actual control parameters, limits, test conditions and acceptance criteria must come from the relevant control-system requirements and calibration plan.

14. Troubleshooting common XCP issues

SymptomPossible checks
XCP connection failsTransport selection, channel, CAN identifiers or IP/port settings, ECU state, wiring and access restrictions
ECU connects but objects are unavailableA2L compatibility, object availability, address extension and access permissions
Measurement value is implausibleA2L revision, address, datatype, byte order, conversion method and scaling
DAQ samples are missingEvent configuration, DAQ resources, bus/network load, queue overflow and transport errors
Acquisition rate is lower than expectedActual event frequency, selected signal count, ECU processing load and transport capacity
Calibration write is rejectedObject write permission, access protection, datatype, limits and memory segment
Value changes but returns after resetRAM versus non-volatile storage and ECU-specific persistence procedure
Tool shows incorrect physical unitsA2L conversion method, unit definition and scaling
Communication is unstablePhysical/network connection, competing traffic, timeout settings and ECU load

A useful troubleshooting sequence is to verify the physical and transport path first, then the XCP connection, access rights, A2L interpretation, DAQ configuration and finally the ECU application behavior.

15. Verification and configuration management

Measurement and calibration results are only useful when the configuration is reproducible.

Retain a record of:

  • ECU hardware and software identifiers.
  • A2L file revision and checksum where required by the process.
  • Calibration dataset and parameter changes.
  • XCP transport and connection settings.
  • Measurement object list, DAQ events and acquisition rates.
  • Tool version and relevant project settings.
  • Test stimulus, operating conditions and timestamps.
  • Lost-sample indications and measurement limitations.
  • Test verdict and approval status.

After calibration changes, verify the ECU against the relevant requirements. Include nominal operation, boundary conditions, fault handling and regression tests as appropriate. A measurement trace alone does not demonstrate that the complete vehicle function is safe or correct.

16. Common mistakes to avoid

  • Loading an A2L file that does not match the ECU software.
  • Assuming XCP-on-CAN and XCP-on-Ethernet have identical setup and performance.
  • Selecting too many high-rate signals without estimating bandwidth.
  • Treating requested DAQ frequency as proof of actual sample timing.
  • Confusing DAQ measurement with STIM functionality.
  • Assuming every XCP measurement object can be written.
  • Assuming an XCP write automatically persists after power-off.
  • Ignoring ECU CPU, RAM and event-processing limits.
  • Making calibration changes without a known-good baseline or approval.
  • Treating XCP as a replacement for UDS diagnostics or ECU programming workflows.

17. Key takeaways

  • XCP provides a master-slave protocol for ECU measurement and calibration.
  • The transport layer may be CAN, CAN FD or Ethernet where supported by the ECU and tool.
  • The A2L description tells the tool how to locate and interpret measurement and calibration objects.
  • DAQ acquires ECU measurements according to configured lists and events.
  • STIM can provide values to the ECU in implementations that support it.
  • Calibration writes require correct object metadata, authorization and controlled parameter limits.
  • A value written during a session may not be persistent after power cycling.
  • Bandwidth, ECU processing resources and measurement timing must all be considered.
  • Traceable software, A2L and calibration versions are essential for repeatable results.

18. Check your understanding

  1. What are the roles of the XCP master and XCP slave?
  2. What information does an A2L description provide to a calibration tool?
  3. What is the purpose of DAQ, and what do DAQ lists and events contribute?
  4. How does XCP-on-CAN differ operationally from XCP-on-Ethernet?
  5. Why can a requested DAQ sample rate differ from the rate actually recorded?
  6. What is the difference between measurement DAQ and STIM?
  7. Why might a calibration value disappear after an ECU power cycle?
  8. What configuration information should be retained with a calibration result?

Suggested answers

  1. The master sends commands and configures measurement or calibration; the slave runs in the ECU and responds or provides the configured data.
  2. It describes objects, addresses, datatypes, dimensions, conversions, units and relevant acquisition metadata.
  3. DAQ streams measurement values; lists organize the data and events determine when acquisition is triggered.
  4. They use different transports and therefore have different connection settings, payload characteristics and bandwidth constraints.
  5. Event timing, ECU processing capacity, transport load, queue resources and protocol overhead can limit actual acquisition.
  6. DAQ acquires values from the ECU; STIM supplies values to the ECU where supported.
  7. The value may have been written to RAM only, or a separate ECU-specific persistence procedure may be required.
  8. ECU software and hardware, A2L revision, calibration dataset, tool and transport configuration, DAQ setup, test conditions and results.

Further reading

Consult the applicable ASAM MCD-1 XCP and ASAM MCD-2 MC (ASAP2) specifications, the ECU supplier's XCP integration and calibration documentation, the measurement tool manual, and the project's calibration and access-control procedures. These sources define the exact protocol version, optional features, object permissions and implementation-specific behavior.