mcXCPSetCalPage
- Updated2023-02-21
- 1 minute(s) read
Purpose
Sets a calibration page.
Format
mcTypeStatus | mcXCPSetCalPage(
|
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:
Bit | Description |
---|---|
0 | The given page is used by the slave device application. |
1 | The slave device XCP driver will access the given page. |
2 | Unused. |
3 | Unused. |
4 | Unused. |
5 | Unused. |
6 | Unused. |
7 | The 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.