1.19.12.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.