1.10.15.7 1.11.16.7 1.12.16.7 1.13.15.7 1.16.12.7 1.17.12.7 1.18.12.7 1.19.12.7 1.20.12.7 1.21.13.7 1.22.17.7 1.23.16.7 1.24.14.7 OCMPx_CompareSecondaryValueSet Function
C
/* x = OCMP instance number */ void OCMPx_CompareSecondaryValueSet (uint32_t value)
Summary
Sets OCMPx Secondary Compare Register. Based on OC32 bit, compare value will be 16-bit or 32-bit. Refer the generated header file for the exact function signature.
Description
This function writes the secondary compare value. When timer counter matches compare value, output pin level changes as per the configured output compare mode.
Precondition
OCMPx_Initialize() function must have been called first.
Parameters
Param | Description |
---|---|
value | compare value |
Returns
void
Example
OCMP1_Initialize();
OCMP1_Enable();
OCMP1_CompareValueSet(500);
Remarks
Based on OC32 bit, compare value will be 16-bit or 32-bit. Refer the generated header file for the exact function signature.