AnsweredAssumed Answered

PWM Frequency Change On the Fly

Question asked by roofie01 on Sep 9, 2016
Latest reply on Sep 9, 2016 by FTITI.Walid
I'm using an STM32F4 to generate PWM pulses. I need to do something a bit difference, the best way to describe it is like FSK ( frequency discontinuity not a problem if it occurs)
For example - if one was looking at sequence of 10 pulses, the first 5 are at T = 2ms (500hz), and the next 5 are at T = 1ms (1Khz) I would want to see the frequency change occur at the interval between the start of the 5th pulse and the start of the 6th - where that delta would be 1ms.

Hoping that someone provide a basic algorithm (or even a code example) on how to accomplish this. Interrupts? Timers? Any help is appreciated,

Thanks!

Outcomes