cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 F0: Double buffered auto loaded (glitch free) PWM

sseveelavanan9
Associate II
Posted on October 02, 2014 at 11:32

Hi,

I'm wondering if following feature exists on the any of the cheaper STM32 ranges? (e.g. STM32 F0?)...

For PWM, the duty cycle is CCRx, the value of which is compared to the counter/timer (CNT), which can be configured to toggle a pin etc. But is there any buffer for CCRx so that its value can be automatically updated at the end of each duty cycle? This is needed for perfect PWM.

Failing some auto loading buffer as above, I'm sure this can be attempted with an interrupt. However, this means that there will be an min_duty_cycle > 0% or max_duty_cycle < 100%, as the interrupt would take X cycles to complete.

Thanks 

#pwm
1 REPLY 1
zzdz2
Associate II
Posted on October 02, 2014 at 11:59

Quote from F0 reference manual: 

The TIMx_CCRx registers can be programmed with or without preload registers using the OCxPE bit in the TIMx_CCMRx register.

 

It means yes, the feature exists in F0 series.