AnsweredAssumed Answered

Fluent frequency modulation

Question asked by Lukasz Przenioslo on Feb 8, 2016
Latest reply on Feb 8, 2016 by Lukasz Przenioslo
Hello there,
I am using STM32F4. I am trying to make an application, where I could be able to modulate the frequency (not pwm) of one channel for example in range of 1k - 20k Hz. The problem i encountered is that for a channel frequency the equasion is applied:

Freq = SysClk / ( (Prescaller + 1) * Period )

Because of this, I cannot change the frequency in a linear way by modifying prescaller and period. Also modifying them both in order to get the result needs a bit of computation which requires time. I was wondering either there is a simplier and more effective way of doing this. For example, lets say each timer tick I would like to change the channel frequency by 10 Hz (starting from 1k and finishing at 20k).

Are there any moethods for that?
I would apreciate all help!

Outcomes