Memory Programming
- Updated2025-10-13
- 3 minute(s) read
The ECU Measurement and Calibration Toolkit allows you to issue a memory programming sequence for your ECU after you create an ECU Reference handle as described in ECU M&C API Basic Programming Model.
The following flowchart illustrates the general process of a memory programming sequence of an ECU with the ECU M&C functions. A description of each step in the decision process follows the flowchart.
Program Start
The Program Start function sets the ECU into the memory programming mode. Note that in this mode specific features might be restricted, for instance, the ECU might refuse to change into the programming mode while a DAQ list is running. The Program Start function is MC Program Start.vi in LabVIEW and mcProgramStart in other languages.
Clear Memory
It might be necessary to clear the memory before it is reprogrammed. The details are ECU-dependent. The Clear Memory function performs the memory clearing operation. It is MC Clear Memory.vi in LabVIEW or mcClearMemory in other languages.
Program
The Program function actually downloads the new code to the ECU. It is MC Program.vi in LabVIEW or mcProgram in other languages.
Program Reset
The Program Reset function terminates a programming sequence. Note that for the XCP protocol, Program Reset performs a hardware reset of the ECU and causes a disconnect. You have to reconnect to the ECU using the ECU Connect function to perform further operations. The Program Reset function is MC Program Reset.vi in LabVIEW and mcProgramReset in other languages.
Optional Steps for the XCP Protocol
XCP Program Prepare
An ECU using the XCP protocol might require an XCP PROGRAM_PREPARE command before a programming sequence is started. This command can be issued with the XCP Program Prepare function. It is MC XCP Program Prepare.vi in LabVIEW and mcXCPProgramPrepare in other languages.
Set XCP Programming Properties
XCP allows the programming process to be controlled by several variables. These are the Compression Method, Encryption Method, Programming Method, and Access Method properties. They default to 0, but can be set to any value before the programming process starts. The allowed values for these properties are ECU-specific. If any of these properties is set to a nonzero value, an appropriate PROGRAM_FORMAT XCP command is issued before the programming takes place. Note that the Access Method property also affects the Clear Memory function.
XCP Program Verify
After the memory programming XCP allows to verify whether the operation was successful by the PROGRAM_VERIFY XCP command. The details of this command are highly ECU-specific. This command can be issued using the XCP Program Verify function. It is MC XCP Program Verify.vi in LabVIEW and mcXCPProgramVerify in other languages.