cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX and Discovery STM32F407VG Timer8 PWM

Nystrom.Eric
Associate
Posted on May 20, 2016 at 15:41

I am trying to configure Timer 8 to generate a PWM signal on either PC8 or PC9 on the Discovery board.  I have used STM32Cube to generate the initialization code.  I have been unable to get this configuration to generate any output.  The ISR associated with Timer8 runs, but there is no PWM output.

I have successfully configured Timer 3 to generate PWM on these pins.  I have compared the pin configurations and timer configurations between Timer 3 and Timer 8 and can find no difference except or the appropriate gpio alternate function value.

Has anyone been able to get the PWM working on Timer8?

Thank you,

Eric Nystrom

#je-ne-l'aime-cube #!android #no-hablo-hal
2 REPLIES 2
Posted on May 20, 2016 at 19:56

Has anyone been able to get the PWM working on Timer8?

Well they do work, both TIM1 and TIM8 are advanced timers, they more more initialization parameters and PWM Output must be explicitly enabled.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Nystrom.Eric
Associate
Posted on May 21, 2016 at 00:15

Thanks for the hint.  I finally got it working.  I was missing setting the MOE bit in the BDTR.

TIM8->BDTR |= TIM_BDTR_MOE;

Eric Nystrom