Merged in antmerlino/nuttx/stm32f7-hsebypclk (pull request #845)

arch/arc/stm32f7: Add support for using the HSE in bypass mode, configured by board.h

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Anthony Merlino 2019-04-03 19:36:52 +00:00 committed by Gregory Nutt
parent 370dc27c60
commit 079a0ada7b
1 changed files with 5 additions and 0 deletions

View File

@ -723,6 +723,11 @@ static void stm32_stdclockconfig(void)
/* Enable External High-Speed Clock (HSE) */
regval = getreg32(STM32_RCC_CR);
#ifdef STM32_HSEBYP_ENABLE /* May be defined in board.h header file */
regval |= RCC_CR_HSEBYP; /* Enable HSE clock bypass */
#else
regval &= ~RCC_CR_HSEBYP; /* Disable HSE clock bypass */
#endif
regval |= RCC_CR_HSEON; /* Enable HSE */
putreg32(regval, STM32_RCC_CR);