Skip to main content
KK_it
Associate II
Oct 12, 2018 2:20 PM UTC
Question

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

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?

This topic has been closed for replies.

5 replies

Tesla DeLorean
Guru
Oct 12, 2018 3:12 PM UTC

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
KK_it
KK_itAuthor
Associate II
Oct 13, 2018 4:13 AM UTC

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

henry.dick
Associate II
Oct 13, 2018 3:21 PM UTC

use master clock out, or pwm function for it.

KK_it
KK_itAuthor
Associate II
Oct 14, 2018 3:27 AM UTC

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

KK_it
KK_itAuthor
Associate II
Oct 23, 2018 1:32 AM UTC

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