1.2.24.62 1.3.24.62 1.4.25.62 1.5.23.62 1.6.25.62 1.7.26.62 1.29.27.62 1.30.17.62 1.31.17.62 1.33.19.62 1.37.17.62 1.40.24.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