1.33.19.62 TCCx_PWM24bitDutySet Function

C

/* x = TCC instance number */
void TCCx_PWM24bitDutySet (TCCx_CHANNEL_NUM channel, uint32_t duty);

Summary

Sets the duty value of a given TCC channel.

Description

This function writes the compare value. Every channel of TCC instance has its own compare register. When counter matches compare value interrupt can be generated. This function writes to the double buffered register. Actual update happens on period match or zero match.

Precondition

TCCx_PWMInitialize function must have been called first for the given channel.

Parameters

Param Description
channel TCC channel number
duty Compare value

Returns

None

Example

TCC0_PWMInitialize();
TCC0_PWM24bitDutySet(TCC0_CHANNEL0, 0x100U);

Remarks

None