ECU Measurement and Calibration Toolkit C API Reference

Table of Contents

mcXCPSetCalPage

  • Updated2023-02-21
  • 1 minute(s) read

Purpose

Sets a calibration page.

Format

mcTypeStatus mcXCPSetCalPage(
mcTypeTaskRef ECURefNum,
u8 Mode,
u8 Segment,
u8 Page);

Input

ECURefNum

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

Mode

Mode is a bit mask described below:

BitDescription
0The given page is used by the slave device application.
1The slave device XCP driver will access the given page.
2Unused.
3Unused.
4Unused.
5Unused.
6Unused.
7The logical segment number is ignored. The command applies to all segments.

Segment

Segment specifies the selected logical data segment number.

Page

Page specifies the logical data page number.

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 mcStatusToString function of the ECU M&C API to obtain a descriptive string for the return value.

Description

mcXCPSetCalPage implements the XCP command SET_CAL_PAGE and sets the access mode for a calibration data segment, if the slave device supports calibration data page switching. A calibration data segment and its pages are specified by logical numbers.

Refer to the ASAM XCP Part 2 Protocol Layer Specification for more information on how to set up a request.

Log in to get a better experience