drivers: clock_control: stm32wba: enable backup domain for lsi clock

LSI clock configuration for STM32WBA is located in backup domain.
The backup domain needs to be enabled before the LSI can be enabled.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit is contained in:
Guillaume Gautier 2023-08-30 09:37:18 +02:00 committed by Fabio Baltieri
commit 4a46163055

View file

@ -420,9 +420,19 @@ static void set_up_fixed_clock_sources(void)
}
if (IS_ENABLED(STM32_LSI_ENABLED)) {
/* LSI belongs to the back-up domain, enable access.*/
/* Set the DBP bit in the Power control register 1 (PWR_CR1) */
LL_PWR_EnableBkUpAccess();
while (!LL_PWR_IsEnabledBkUpAccess()) {
/* Wait for Backup domain access */
}
LL_RCC_LSI1_Enable();
while (LL_RCC_LSI1_IsReady() != 1) {
}
LL_PWR_DisableBkUpAccess();
}
if (IS_ENABLED(STM32_LSE_ENABLED)) {