stm32: Enable ADC3 pins on stm32f446
Reported by @bigtreetech. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
b333547f1f
commit
bde6215c3f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue