AnsweredAssumed Answered

Variable Frequency PWM

Question asked by weblar on Mar 16, 2017
Latest reply on Mar 20, 2017 by weblar



I'm wanting to generate continuous sequences of pulses, each of which sequence may have a different frequency.


For example, I need to generate the following:

10 pulses, 4800Hz

8 pulses, 4200Hz

4 pulses, 3200Hz

2 pulses, 1000Hz

1 pulse, 100Hz

2 pulses, 800Hz,

6 pulses, 1800Hz


Using the above as an example, I can't decide whether my best option is a software PWM system rather than using a FlexTimer - the latter, I'm not entirely sure will help me as I don't think I can generate the broad spectrum of frequencies necessary.


The range of frequencies can be anywhere in the range of 10Hz up to 20kHz.


The key thing to the above is that there cannot be a break in the pulse generation - the transition between frequencies must be seamless.


Any suggestions would be greatly received.