drivers: clock_control: clock_stm32: Add support for lse bypass
Add support for LSE bypass for all STM32 series Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit is contained in:
parent
a407c4e04e
commit
a332ee3172
3 changed files with 15 additions and 0 deletions
|
@ -616,6 +616,11 @@ static void set_up_fixed_clock_sources(void)
|
|||
LL_RCC_LSE_SetDriveCapability(STM32_LSE_DRIVING << RCC_BDCR_LSEDRV_Pos);
|
||||
#endif
|
||||
|
||||
if (IS_ENABLED(STM32_LSE_BYPASS)) {
|
||||
/* Configure LSE bypass */
|
||||
LL_RCC_LSE_EnableBypass();
|
||||
}
|
||||
|
||||
/* Enable LSE Oscillator (32.768 kHz) */
|
||||
LL_RCC_LSE_Enable();
|
||||
while (!LL_RCC_LSE_IsReady()) {
|
||||
|
|
|
@ -602,6 +602,11 @@ static void set_up_fixed_clock_sources(void)
|
|||
/* Configure driving capability */
|
||||
LL_RCC_LSE_SetDriveCapability(STM32_LSE_DRIVING << RCC_BDCR_LSEDRV_Pos);
|
||||
|
||||
if (IS_ENABLED(STM32_LSE_BYPASS)) {
|
||||
/* Configure LSE bypass */
|
||||
LL_RCC_LSE_EnableBypass();
|
||||
}
|
||||
|
||||
/* Enable LSE oscillator */
|
||||
LL_RCC_LSE_Enable();
|
||||
while (LL_RCC_LSE_IsReady() != 1) {
|
||||
|
|
|
@ -628,6 +628,11 @@ static void set_up_fixed_clock_sources(void)
|
|||
/* Configure driving capability */
|
||||
LL_RCC_LSE_SetDriveCapability(STM32_LSE_DRIVING << RCC_BDCR_LSEDRV_Pos);
|
||||
|
||||
if (IS_ENABLED(STM32_LSE_BYPASS)) {
|
||||
/* Configure LSE bypass */
|
||||
LL_RCC_LSE_EnableBypass();
|
||||
}
|
||||
|
||||
/* Enable LSE Oscillator */
|
||||
LL_RCC_LSE_Enable();
|
||||
/* Wait for LSE ready */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue