This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sinusoidal PWM

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

Parents
  • Thanks for your help!

    I'm using the second code, the one with IRQ, but I got 26 errors because a lot of functions and structures you've used are unknown to Keil, like:

    TIM_IT_Update
    TIM_Cmd
    RCC_AHB1PeriphClockCmd
    NVIC_InitStructure
    ...
    and many more

    What library did you use? I can't find none of these functions.
    Did you program the code for the STM32F401RE?

    Mara

Reply
  • Thanks for your help!

    I'm using the second code, the one with IRQ, but I got 26 errors because a lot of functions and structures you've used are unknown to Keil, like:

    TIM_IT_Update
    TIM_Cmd
    RCC_AHB1PeriphClockCmd
    NVIC_InitStructure
    ...
    and many more

    What library did you use? I can't find none of these functions.
    Did you program the code for the STM32F401RE?

    Mara

Children