Skip to main content
Visitor II
June 6, 2024
Question

STM32F40 Pin Alternative function PG

  • June 6, 2024
  • 1 reply
  • 1185 views

Hello,

 

I have a question regarding PG pins PG0 to PG10.

Can any of these pins (PG0 to PG10) be used to provide a PWM signal at around 20kHz. 

 

alejandrocaler_1-1717659185609.png

 

alejandrocaler_0-1717414639569.png

alejandrocaler_0-1717659101515.png

Thank you in advance

 

 

 

 

1 reply

waclawek.jan
Super User
June 6, 2024

Which STM32 in particular?

If there is no timer channel connected with those pins, you'd need to generate the output signal "manually", e.g. in interrupt.

This involves jitter or other timing imperfections depending on the exact implementation; whether this suits your application is upon you to judge.

JW