cancel
Showing results for 
Search instead for 
Did you mean: 

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

SB.1
Associate

Hallo.

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

What can I do ?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

1 REPLY 1
TDK
Guru

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".