mcXCPSetSegmentMode
- Updated2025-09-25
- 1 minute(s) read
Purpose
Sets the mode of a specified segment. Format
| mcTypeStatus |
mcXCPSetSegmentMode(
|
Input
ECURefNum
ECURefNum is the task reference which links to the selected ECU. This reference is originally returned from .
Segment
Segment specifies the logical data segment number.
Mode
Mode specifies the mode for the segment. 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.
Descriptionimplements the XCP command SET_SEGMENT_MODE and sets the selected segment into the specified mode. If Mode=0 the segment disables the FREEZE mode, if Mode=1 the segment is set to FREEZE mode through an XCP STORE_CAL_REQ operation.
Refer to the ASAM XCP Part 2 Protocol Layer Specification for more information on how to set up a request.