mirror of
https://github.com/apache/nuttx.git
synced 2026-09-13 14:10:18 +00:00
arch/stm32g4: fix ADC clock after ef517ed
This commit is contained in:
parent
f22ef83cd6
commit
04a66d2d3a
1 changed files with 19 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue