Hello,
I'm tyring to program a STM32F4 (with ARM F4) board to generate a sinusoidal PWM, that is a sequence of pulses with variable width that, once filtered by a LPF, gives a sinusoid.
I was told the best way to get it is by generating a sequence of single pulses synchronized to timer by interrupts.
I've tried several solutions but I'm not good at managing interrupts.
Do you have any idea how to achieve this goal? Can you attach a piece of code where it's explained how to do it?
Thanks in advance! ;)
Mara
Hi Clive,
I want to create 5kHz sin wave and I used the code which you shared. I have to set 500kHz sampling frequency for 5 kHz sin wave. What should be cut off frequency RC filter for 5kHz sinwave?
Best regards,