1.8.14.4 1.25.13.4 1.26.12.4 1.27.13.4 1.28.16.4 1.34.11.4 1.41.13.4 1.42.11.4 PWMx_ChannelPeriodSet Function
C
/* x = PWM instance number */ void PWMx_ChannelPeriodSet (PWM_CHANNEL_NUM channel, uint32_t period); void PWMx_ChannelPeriodSet (PWM_CHANNEL_NUM channel, uint16_t period);
Summary
Sets the period value of given PWM channel
Description
This function writes the period value in double buffer register. Update to the actual period register happens at the next period border.
Precondition
PWMx_Initialize() function must have been called first for the associated instance. And associated channel must be running.
Parameters
Param | Description |
---|---|
channel | PWM channel number |
period | period value corresponding to PWM frequency |
Returns
None.
Example
PWM0_Initialize(); PWM0_ChannelsStart(PWM_CHANNEL_0_MASK); PWM0_ChannelPeriodSet(PWM_CHANNEL_0, 0x500);
Remarks
Refer the generated header file for the exact function signature