stm32: Support for STM32F401 (#3853)

This module adds support for the STM32F401 microcontrollers

Signed-off-by: Marco D'Alessio <marco@wrecklab.com>
This commit is contained in:
smark- 2021-02-01 01:41:53 +01:00 committed by GitHub
parent 60e4cddf36
commit ef4d9c3abd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 9 deletions

View file

@ -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 {