Purpose

Sets the appropriate RAM or ROM calibration page on the ECU. Format

mcTypeStatus mcECUSetCalibrationPage (
mcTypeTaskRef ECURefNum,
u8 UseRAM,
u8 mapAddresses);

Input

ECURefNum

ECURefNum is the task reference that links to the selected ECU. This reference is originally returned from mcECUSelectEx.

UseRAM

0: Select ROM calibration page. 1: Select RAM calibration page.

mapAddresses

0: Do not map addresses. 1: Map addresses from ROM to the page specified in UseRAM. Output

Return Value

The return value indicates the status of the function call as a signed 32-bit integer. Zero means the function executed successfully. A negative value specifies an error, which means the function did not perform the expected behavior. A positive value specifies a warning, which means the function performed as expected, but a condition arose that may require attention.

Use the function of the ECU M&C API to obtain a descriptive string for the return value.

Description

mcECUSetCalibrationPage tries to identify a single RAM or ROM page on the ECU and select it according to the UseRAM input.

To identify an appropriate page, the function searches for the calibration page information from the A2L file or online information from the ECU. If the function identifies a unique calibration page, it is activated in the ECU, and the function returns success.

If the function does not identify a unique page, an error indicating this is returned, and no further action is taken. This does not state a fault, but just the algorithm's inability to uniquely identify the desired page. In this case, you can use the calibration page-related ECU properties (mcGetProperty, ECU»CCP»Cal Pages»... or ECU»XCP»Cal Pages»...) to gain the information about available calibration pages, and manually select the correct page using mcCCPSelectCalPage or mcXCPSetCalPage.

The mapAddresses parameter activates the address mapping from the ROM page, assumed to be the reference page to the target page specified in UseRAM. Address mapping is supported for only the CCP protocol and requires a unique ROM and unique RAM page in the A2L file. Addresses of measurements and characteristics in the A2L file must point to the ROM page as a reference page.