Purpose

Prepares the programming of non volatile memory.

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.
Address specifies the address part of the source address.
Extension contains the extension part of the source address.
code size determines the size of data code to be downloaded by the subsequent memory programming.
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.
status is TRUE if an error occurred. This VI is not executed when status is TRUE.
code is the error code number identifying an error. A value of 0 means success. A negative value means error: VI did not execute the intended operation. A positive value means warning: VI executed intended operation, but an informational warning is returned. For a description of the code, wire the error cluster to a LabVIEW error-handling VI, such as the Simple Error Handler.
source identifies the VI where the error occurred.

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.
status is TRUE if an error occurred.
code is the error code number identifying an error. A value of 0 means success. A negative value means error: VI did not execute the intended operation. A positive value means warning: VI executed intended operation, but an informational warning is returned. For a description of the code, wire the error cluster to a LabVIEW error-handling VI, such as the Simple Error Handler.
source identifies the VI where the error occurred.

Description

MC XCP Program Prepare.vi may be used to indicate a data download as a pre-condition for non-volatile memory reprogramming. The Memory Transfer address (MTA) pointer is set to the volatile memory location specified by the parameters Address and Extension. The download itself is done by using subsequent standard commands like MC Download.vi. The slave device must ensure that the target memory area is available and it is in an operational state which permits the download of code. If not, an error will be returned.

MC XCP Program Prepare.vi implements the optional XCP PROGRAM_PREPARE command defined by the XCP specification. For further information on how to program non-volatile ECU memory refer to the ASAM XCP Part 2 Protocol Layer Specification.