1.2.24.66 1.3.24.66 1.4.25.66 1.5.23.66 1.6.25.66 1.7.26.66 1.29.27.66 1.30.17.66 1.31.17.66 1.33.19.66 1.37.17.66 1.40.24.66 TCCx_PWM32bitPeriodSet Function
C
/* x = TCC instance number */ void TCCx_PWM32bitPeriodSet ( uint32_t period );
Summary
Sets the period value of a given TCC instance.
Description
This function writes the period value. Period value is shared between all the channels of TCC instance. When counter matches period 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 and TCCx_PWMStart functions must have been called first for the given channel.
Parameters
Param | Description |
---|---|
period | Period value. Counter increments till this value |
Returns
None.
Example
TCC0_PWMInitialize();
TCC0_PWMStart();
TCC0_PWM32bitPeriodSet(0x500ul);
Remarks
This function waits till sync operation is complete. TCC should be running to write to double buffered period register.