MC Program.vi
- Updated2023-02-21
- 4 minute(s) read
MC Program.vi
Purpose
Programs a memory block on the ECU.
Format
Input
![]() |
ECU ref in is the task reference which links to the selected ECU. This reference is originally returned from MC ECU Open.vi or MC ECU Select.vi, and then wired through subsequent VIs. | ||||||
![]() |
Address is a cluster which contains the following values.
|
||||||
![]() |
Data contains the byte array to be transmitted to the ECU. | ||||||
![]() |
Error in is a cluster which describes error conditions occurring before the VI executes. If an error has already occurred, the VI returns the value of the error in cluster to error out.
|
Output
![]() |
ECU ref out is the same as ECU ref in. Wire the task reference to subsequent VIs for this task. | ||||||
![]() |
Error out describes error conditions. If the Error in cluster indicated an error, the Error out cluster contains the same information. Otherwise, Error out describes the error status of this VI.
|
Description
If you are using the CCP protocol, MC Program.vi implements the CCP command PROGRAM. The command is used to program the specified data into nonvolatile ECU memory (Flash, EEPROM, etc.). Programming starts at the selected MTA0 address and extension defined in the Address cluster.
If you are using the XCP protocol, MC Program.vi implements the XCP command PROGRAM. The command is used to program a non-volatile memory segment in the ECU slave. The end of the programming sequence is indicated by using the MC Program Reset .vi command which executes the XCP command PROGRAM_RESET. The slave device will move into a disconnected state. Usually a hardware reset of the slave device is executed. This command may support block transfer similar to the commands DOWNLOAD and DOWNLOAD_NEXT.
For further information on how to use the MC Program.vi and details on block mode transfers, refer to the ASAM XCP Part 2 Protocol Layer Specification.