Skip to main content
JShel.1
Associate II
May 19, 2020
Question

Using interrupts (too quickly) prevents PWM from working?

  • May 19, 2020
  • 1 reply
  • 707 views

I fixed my mistakes from my last iteration of code (reduced 6MHz interrupt rate (which is impossible) to around 35KHz,) and reduced the amount of code in the interrupt. PWM on any timer still refuses to work even though I've enabled them. Is it possible for interrupts quicker than a certain rate to inhibit starting of timer PWM? Enabling preload does not fix the issue, and enabling the timers normally doesn't work either (without the IT at the end.)

This topic has been closed for replies.

1 reply

TDK
Super User
May 19, 2020

PWM is done independent of the CPU. Once started, it's not possible for interrupts to stop it from happening, unless those interrupts mess with the timer or re-initialize the pins.

Check your TIM and GPIO registers to ensure the PWM is set correctly.

"If you feel a post has answered your question, please click ""Accept as Solution""."