Skip to main content
SB.1
Visitor II
August 28, 2020
Solved

How can I generate a PWM on an GPIO? (pin can't configure as a timer output)

  • August 28, 2020
  • 1 reply
  • 634 views

Hallo.

I wanna generate a PWM on an GPIO. I can't configure the pin in STM32MXCube as Timer output.

What can I do ?

This topic has been closed for replies.
Best answer by TDK

Set up a periodic timer interrupt and toggle the pin in the interrupt. Timing won't be exact, but it may be good enough.

1 reply

TDK
TDKBest answer
August 28, 2020

Set up a periodic timer interrupt and toggle the pin in the interrupt. Timing won't be exact, but it may be good enough.

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