From 031eda1d7e36c3ae231104028b652eb35d7ce44c Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Wed, 17 Jul 2024 19:07:10 +0200 Subject: [PATCH] STM32F4xx: fixed bug in gpio driver Fixed bug causing gpios set in alternate function mode to have the internal pull-up resistor enabled, even if not requested. --- platform/mcu/STM32F4xx/drivers/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/mcu/STM32F4xx/drivers/gpio.c b/platform/mcu/STM32F4xx/drivers/gpio.c index d6763c25..f5cc2935 100644 --- a/platform/mcu/STM32F4xx/drivers/gpio.c +++ b/platform/mcu/STM32F4xx/drivers/gpio.c @@ -98,7 +98,7 @@ void gpio_setMode(const void *port, const uint8_t pin, const uint16_t mode) // (MODE=10 TYPE=0 PUP=00) p->MODER |= 0x02 << (pin*2); p->OTYPER |= 0x00 << pin; - p->PUPDR |= 0x01 << (pin*2); + p->PUPDR |= 0x00 << (pin*2); setGpioAf(p, pin, af); break;