|Download Help (Windows Only)|
Calculates a checksum over a defined memory range within the ECU.
|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.
|Block size determines the size of the block for which the checksum has to be calculated.|
|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.
|ECU ref out is the same as ECU ref in. Wire the task reference to subsequent VIs for this task.|
|Type of checksum returns the type of the calculated checksum. If you are using the CCP protocol, type of checksum is 0xFF. For XCP, refer to the Description section.|
|Checksum returns the calculated checksum.|
|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.
MC Build Checksum.vi is used to calculate the checksum of the specified memory block inside the ECU starting at the selected Memory Transfer Address. The checksum algorithm is not specified by CCP and the checksum algorithm may be different on different devices.
If you are using the CCP protocol, MC Build Checksum.vi implements the CCP BUILD_CHKSUM command. The checksum algorithm is not specified by CCP and the checksum algorithm may be different on different devices.
If you are using the XCP protocol, MC Build Checksum.vi implements the BUILD_CHECKSUM command of the XCP specification. The result of the checksum calculation is returned in Checksum regardless of the checksum type. The following values for type of checksum are defined in the XCP specification:
|0x01||XCP_ADD_11||Add BYTE into a BYTE checksum, ignore overflows|
|0x02||XCP_ADD_12||Add BYTE into a WORD checksum, ignore overflows|
|0x03||XCP_ADD_14||Add BYTE into a DWORD checksum, ignore overflows|
|0x04||XCP_ADD_22||Add WORD into a WORD checksum, ignore overflows, block size must be modulo 2|
|0x05||XCP_ADD_24||Add WORD into a DWORD checksum, ignore overflows, block size must be modulo 2|
|0x06||XCP_ADD_44||Add DWORD into DWORD, ignore overflows, block size must be modulo 4|
|0x07||XCP_CRC_16||Refer to CRC error detection algorithms|
|0x08||XCP_CRC_16_CITT||Refer to CRC error detection algorithms|
|0x09||XCP_CRC_32||Refer to CRC error detection algorithms|
|0xFF||XCP_USER_DEFINED||User defined algorithm in externally calculated function|
If type of checksum is returned as 0xFF (XCP_USER_DEFINED), the slave can indicate that the master for calculating the checksum must use a user-defined algorithm implemented in an externally calculated function (for instance, Win32 DLL, UNIX shared object file, etc.). The master gets the name of the external function file to be used for this slave from the ASAM MCD 2MC description file or from a property which can be set.
For a detailed description of the checksum algorithm, refer to the XCP Part 2 Protocol Layer Specification.