From c930fc392b6977b17d6f7953bd738583974208c2 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 20 Aug 2019 01:04:20 -0400 Subject: stm32: Make sure to enable the gpio clock prior to setting the first value Signed-off-by: Kevin O'Connor --- src/stm32/gpio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/stm32/gpio.c') diff --git a/src/stm32/gpio.c b/src/stm32/gpio.c index 9fbbdaec..8db0b7c4 100644 --- a/src/stm32/gpio.c +++ b/src/stm32/gpio.c @@ -52,6 +52,7 @@ gpio_out_setup(uint32_t pin, uint32_t val) if (GPIO2PORT(pin) >= ARRAY_SIZE(digital_regs)) goto fail; GPIO_TypeDef *regs = digital_regs[GPIO2PORT(pin)]; + gpio_clock_enable(regs); struct gpio_out g = { .regs=regs, .bit=GPIO2BIT(pin) }; gpio_out_reset(g, val); return g; -- cgit v1.2.3-70-g09d2