From bde6215c3f9b78a99c5ac0b74ec0968b60d5f221 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 6 May 2021 12:41:03 -0400 Subject: [PATCH] stm32: Enable ADC3 pins on stm32f446 Reported by @bigtreetech. Signed-off-by: Kevin O'Connor --- src/stm32/adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stm32/adc.c b/src/stm32/adc.c index 3258faf2..93a5309c 100644 --- a/src/stm32/adc.c +++ b/src/stm32/adc.c @@ -32,7 +32,7 @@ static const uint8_t adc_pins[] = { 0x00, 0x00, ADC_TEMPERATURE_PIN, #endif -#if CONFIG_MACH_STM32F4 +#if CONFIG_MACH_STM32F405 || CONFIG_MACH_STM32F407 || CONFIG_MACH_STM32F446 0x00, 0x00, 0x00, 0x00, GPIO('F', 6), GPIO('F', 7), GPIO('F', 8), GPIO('F', 9), GPIO('F', 10), GPIO('F', 3), 0x00, 0x00, @@ -83,7 +83,7 @@ gpio_adc_setup(uint32_t pin) // Determine which ADC block to use ADC_TypeDef *adc = ADC1; uint32_t adc_base = ADC1_BASE; -#if CONFIG_MACH_STM32F405 || CONFIG_MACH_STM32F407 +#if CONFIG_MACH_STM32F405 || CONFIG_MACH_STM32F407 || CONFIG_MACH_STM32F446 if (chan >= 19) { // On the STM32F4, some ADC channels are only available from ADC3 adc = ADC3;