Fast pin toggling on STMH723
I have been trying to see how fast can I toggle the pins on STM32H7 MCU. I'm using a nucleo-H723zg board.
the clock configs are at the highest (550Mhz for CPU, 275 for APB and AHB), the pins are configured as very high speed.
But still with a simple while loop such as
while (1) {
GPIOE->BSRR = (uint32_t) GPIO_PIN_2;
GPIOE->BSRR = (uint32_t) GPIO_PIN_2 << 16U;
}
the frequency of the PWM I see on the oscilloscope is 7.3 MHz max. Ofcourse the PWM is not the final goal
but I wanted to see how fast this mcu can implemnet the bit toggling.
Am I doing something wrong here?

