summaryrefslogtreecommitdiff
path: root/chip/stm32/gpio-stm32f.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/stm32/gpio-stm32f.c')
-rw-r--r--chip/stm32/gpio-stm32f.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/chip/stm32/gpio-stm32f.c b/chip/stm32/gpio-stm32f.c
index 147f461528..9a381edfee 100644
--- a/chip/stm32/gpio-stm32f.c
+++ b/chip/stm32/gpio-stm32f.c
@@ -5,6 +5,7 @@
/* GPIO module for Chrome EC */
+#include "clock.h"
#include "common.h"
#include "gpio.h"
#include "hooks.h"
@@ -116,6 +117,9 @@ void gpio_enable_clocks(void)
#else
STM32_RCC_APB2ENR |= 0x1fd;
#endif
+
+ /* Delay 1 APB clock cycle after the clock is enabled */
+ clock_wait_bus_cycles(BUS_APB, 1);
}
void gpio_set_alternate_function(uint32_t port, uint32_t mask, int func)