drivers: rtc: stm32: avoid using LL_RTC_Init

LL_RTC_Init() internally uses LL_RTC_EnterInitMode() wich uses a blocking
while loop. This rewrite uses the less CPU time wasteful local
rtc_stm32_enter_initialization_mode() instead. As a side effect
LL_RTC_InitTypeDef in rtc_stm32_config is not needed anymore.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
This commit is contained in:
Johan Lafon 2023-09-11 17:47:57 +02:00 committed by Fabio Baltieri
commit e46aff5902
2 changed files with 31 additions and 29 deletions

View file

@ -5,7 +5,6 @@ config RTC_STM32
bool "STM32 RTC driver"
default y if !COUNTER
depends on DT_HAS_ST_STM32_RTC_ENABLED && !SOC_SERIES_STM32F1X
select USE_STM32_LL_RTC
select USE_STM32_LL_PWR
select USE_STM32_LL_RCC
help