aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/stm32/stm32h7_adc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stm32/stm32h7_adc.c b/src/stm32/stm32h7_adc.c
index e9dc8f84..3c217ca2 100644
--- a/src/stm32/stm32h7_adc.c
+++ b/src/stm32/stm32h7_adc.c
@@ -189,7 +189,11 @@ gpio_adc_setup(uint32_t pin)
if (chan >= 2 * ADCIN_BANK_SIZE) {
chan -= 2 * ADCIN_BANK_SIZE;
adc = ADC3;
+#if CONFIG_MACH_STM32G4
+ adc_common = ADC345_COMMON;
+#else
adc_common = ADC3_COMMON;
+#endif
} else
#endif
#ifdef ADC2