diff options
Diffstat (limited to 'chip/stm32/adc-stm32f.c')
-rw-r--r-- | chip/stm32/adc-stm32f.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chip/stm32/adc-stm32f.c b/chip/stm32/adc-stm32f.c index 7a92130ece..d6ff369ef9 100644 --- a/chip/stm32/adc-stm32f.c +++ b/chip/stm32/adc-stm32f.c @@ -266,6 +266,12 @@ static void adc_init(void) */ STM32_RCC_APB2ENR |= (1 << 9); + /* + * ADC clock is divided with respect to AHB, so no delay needed + * here. If ADC clock is the same as AHB, a dummy read on ADC + * register is needed here. + */ + if (!adc_powered()) { /* Power on ADC module */ STM32_ADC_CR2 |= (1 << 0); /* ADON */ |