From 9bdd61758e61d4652ae09515425c3316c6cfe905 Mon Sep 17 00:00:00 2001 From: adelyser <12093019+adelyser@users.noreply.github.com> Date: Wed, 29 Dec 2021 16:01:28 -0700 Subject: [PATCH] stm32: Fix the GPIO register for stm32h7 (#5077) Signed-off-by: Aaron DeLyser --- src/stm32/stm32h7.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stm32/stm32h7.c b/src/stm32/stm32h7.c index 4edab5f0..0e4094c1 100644 --- a/src/stm32/stm32h7.c +++ b/src/stm32/stm32h7.c @@ -100,9 +100,9 @@ get_pclock_frequency(uint32_t periph_base) void gpio_clock_enable(GPIO_TypeDef *regs) { - uint32_t pos = ((uint32_t)regs - D3_APB1PERIPH_BASE) / 0x400; - RCC->APB4ENR |= (1<APB4ENR; + uint32_t pos = ((uint32_t)regs - D3_AHB1PERIPH_BASE) / 0x400; + RCC->AHB4ENR |= (1<AHB4ENR; } #if !CONFIG_STM32_CLOCK_REF_INTERNAL