2.114.71 TCCx_PWM32bitDutySet Function

C

/* x = TCC instance number */
void TCCx_PWM32bitDutySet (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

ParamDescription
channelTCC channnel number
dutycompare value

Returns

None.

Example

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

Remarks

None.