drivers: timer: stm32u5 lptimer waits for DIER complete
On the stm32U5, when modifying the DIER register of the LPTIM peripheral, a new write operation to can only be performed when the previous write operation is completed and before going-on. Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
3d216e7675
commit
23f03c8030
1 changed files with 5 additions and 0 deletions
|
@ -435,6 +435,11 @@ static int sys_clock_driver_init(void)
|
||||||
/* ARROK bit validates the write operation to ARR register */
|
/* ARROK bit validates the write operation to ARR register */
|
||||||
LL_LPTIM_EnableIT_ARROK(LPTIM);
|
LL_LPTIM_EnableIT_ARROK(LPTIM);
|
||||||
stm32_lptim_wait_ready();
|
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);
|
LL_LPTIM_ClearFlag_ARROK(LPTIM);
|
||||||
|
|
||||||
accumulated_lptim_cnt = 0;
|
accumulated_lptim_cnt = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue