drivers: timer: stm32u5 lptimer wait for ready only once

The stm32_lptim_wait_ready() is waiting for the DIEROK flag
with a while loop. It should not be repeated.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2023-05-02 13:36:12 +02:00 committed by Carles Cufí
commit 1f070c91cf

View file

@ -447,11 +447,6 @@ static int sys_clock_driver_init(void)
/* ARROK bit validates the write operation to ARR register */
LL_LPTIM_EnableIT_ARROK(LPTIM);
stm32_lptim_wait_ready();
#ifdef CONFIG_SOC_SERIES_STM32U5X
while (LL_LPTIM_IsActiveFlag_DIEROK(LPTIM) == 0) {
}
LL_LPTIM_ClearFlag_DIEROK(LPTIM);
#endif
LL_LPTIM_ClearFlag_ARROK(LPTIM);
accumulated_lptim_cnt = 0;