Very slow GPIO on STM32H743?
- June 19, 2018
- 1 reply
- 2198 views
Hi all,
I've started playing around with the NUCLEO-H743ZI to try out the H7 series and I've noticed that toggling GPIO output with BSRR is very slow. I've used CUBE to configure the board for a 400MHz SYSCLK and my main loop just continuously toggles PE0 with BSRR as below:
while (1)
{
TOGGLE_GPIO_Port->BSRRH = TOGGLE_Pin;
TOGGLE_GPIO_Port->BSRRL = TOGGLE_Pin;
TOGGLE_GPIO_Port->BSRRH = TOGGLE_Pin;
TOGGLE_GPIO_Port->BSRRL = TOGGLE_Pin;
}
Resulting scope trace attached - the output toggles at 17MHz (blue), which seems extremely slow. For comparison MCO2 set to SYSCLK/10 (yellow) is 40MHz, and TIM1 set to PWM (purple) can output 100MHz. I've checked my GPIO speeds (GPIO_SPEED_FREQ_VERY_HIGH) and my peripheral clocks.
Has anyone else observed slow GPIO on the H7? Is there a setting I've missed? Or is there a spec I've missed?
For comparison, the same test on my NUCLEO-F767ZI at 216MHz SYSCLK yields 108MHz. I wasn't expecting the H7 to be 6x slower!
Cheers,
Martijn