cancel
Showing results for 
Search instead for 
Did you mean: 

PWM signal prescaler

mehdi23
Associate
Posted on October 12, 2013 at 18:48

Hello, in fact I've been working on the STM32F3 Discovery Board and I could generate a PWM signal. But there is still something I couldn't understand, which is how to calculate the prescaler value according to the period value to make the variations of the PWM signal generated ''smooth''.

I had no success in finding a right answer elsewhere.

Thanks in advance
1 REPLY 1
Posted on October 12, 2013 at 19:16

FREQ = TIMCLK / ((PRESCALER + 1) * (PERIOD + 1))

In order to control the phase hit you should not use the ''Immediate Load'' feature but let the new value of PERIOD get latched at the Update event.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..