From ef4d9c3abd30ae8a485020fd9ff2fb4529a143b3 Mon Sep 17 00:00:00 2001 From: smark- Date: Mon, 1 Feb 2021 01:41:53 +0100 Subject: stm32: Support for STM32F401 (#3853) This module adds support for the STM32F401 microcontrollers Signed-off-by: Marco D'Alessio --- src/stm32/adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/stm32/adc.c') diff --git a/src/stm32/adc.c b/src/stm32/adc.c index 0d3f33ce..915c7d34 100644 --- a/src/stm32/adc.c +++ b/src/stm32/adc.c @@ -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_STM32F4 +#if CONFIG_MACH_STM32F405 || CONFIG_MACH_STM32F407 if (chan >= 19) { // On the STM32F4, some ADC channels are only available from ADC3 adc = ADC3; @@ -108,7 +108,7 @@ gpio_adc_setup(uint32_t pin) } if (pin == ADC_TEMPERATURE_PIN) { -#if !CONFIG_MACH_STM32F1 +#if !(CONFIG_MACH_STM32F1 || CONFIG_MACH_STM32F401) ADC123_COMMON->CCR = ADC_CCR_TSVREFE; #endif } else { -- cgit v1.2.3-70-g09d2