1.2.24.60 1.3.24.60 1.4.25.60 1.5.23.60 1.6.25.60 1.7.26.60 1.29.27.60 1.30.17.60 1.31.17.60 1.33.19.60 1.37.17.60 1.40.24.60 TCCx_PWM16bitPeriodSet Function
C
/* x = TCC instance number */ void TCCx_PWM16bitPeriodSet ( uint16_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 function 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_PWM16bitPeriodSet(0x500ul);
Remarks
This function waits till sync operation is complete. TCC should be running to write to double buffered period register.