2025-03-20 2:07 AM - last edited on 2025-03-20 2:14 AM by Andrew Neil
Dear Support Team,
I am encountering an unexpected issue with my STM32H743IIT6 microcontroller where the GPIO operation frequency observed via an oscilloscope is only 16.6 MHz, despite configuring the bus clock at 400 MHz and AHB clock at 200 MHz. Below is the code snippet I am using for testing:
__attribute__((section("RAM_CODE"))) void gpio_test()
{
while(1)
{
GPIOB->BSRR = 0x02; /* PB1 set high */
GPIOB->BSRR = 0x020000; /* PB1 set low */
}
}
STM32F407 168M clock, GPIO with the same code can reach 33M
2025-03-20 2:32 AM
This behaviour has been discussed here: Solved: STM32H7 GPIO TOGLE MAX FREQUENCY - STMicroelectronics Community
https://community.st.com/t5/stm32-mcus-products/stm32h7-gpio-togle-max-frequency/m-p/336687
hth
KnarfB
2025-03-20 2:34 AM
Hi,
thats nothing new about this , just look at the block circuit, where the ports are : far away from the cpu, on AHB4 bus and at its speed . (So you can get at best the speed of the bus, the port is connected to.)
So this series is not intended to do something fast on the port pins by bit banging, it has many peripherals for fast output, SPI, etc.
Compare H5 series, port is direct connected to cpu, so its really fast on port access , maybe 60MHz output can be reached.