1.2.24.58 1.3.24.58 1.4.25.58 1.5.23.58 1.6.25.58 1.7.26.58 1.29.27.58 1.30.17.58 1.31.17.58 1.33.19.58 1.37.17.58 1.40.24.58 TCCx_PWM16bitDutySet Function

C

/* x = TCC instance number */
void TCCx_PWM16bitDutySet (TCCx_CHANNEL_NUM channel, uint16_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_PWM16bitDutySet(TCC0_CHANNEL0, 0x100U);

Remarks

None