arch/stm32g4: fix ADC clock after ef517ed

This commit is contained in:
raiden00pl
2022-11-17 10:58:42 +01:00
committed by Xiang Xiao
parent f22ef83cd6
commit 04a66d2d3a
+19
View File
@@ -961,6 +961,25 @@ static void stm32_stdclockconfig(void)
regval |= STM32_CCIPR_FDCANSRC;
putreg32(regval, STM32_RCC_CCIPR);
#endif
#if defined(CONFIG_STM32_ADC1) || defined(CONFIG_STM32_ADC2)
/* Configure ADC12 clock */
regval = getreg32(STM32_RCC_CCIPR);
regval &= ~RCC_CCIPR_ADC12SEL_MASK;
regval |= RCC_CCIPR_ADC12SEL_PLLP;
putreg32(regval, STM32_RCC_CCIPR);
#endif
#if defined(CONFIG_STM32_ADC3) || defined(CONFIG_STM32_ADC4) || \
defined(CONFIG_STM32_ADC5)
/* Configure ADC345 clock */
regval = getreg32(STM32_RCC_CCIPR);
regval &= ~RCC_CCIPR_ADC345SEL_MASK;
regval |= RCC_CCIPR_ADC345SEL_PLLP;
putreg32(regval, STM32_RCC_CCIPR);
#endif
}
/****************************************************************************