cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate a 22MHz square wave by using internal clock in STM32H743

KK
Associate II

I will like to generate a 22 Mhz square wave by using internal clock. I have tried to use TIM3 to trigger ON OFF a GPIO pin PE9 , but i only get 800khz ++ . Anyone can help?

5 REPLIES 5

Don't be using interrupts. The TIM hardware is capable of toggling the pin or driving in a 50/50 PWM mode at rates which should exceed 22 MHz.

The real issue will be that you will need to run the H7 at an integer multiple of 22 MHz (say 396 MHz)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
KK
Associate II

Sorry I in new beginner in STM32H743 MCU. May you give a example how to driving in a 50/50 PWM mode?

henry.dick
Senior II

use master clock out, or pwm function for it.

KK
Associate II

master clock out possible to get square wave ? i tried it before , but only can get a sin wave.

KK
Associate II

I able to solve the issue now. Thanks for the help.