driver: timer: stm32_lptim: fix hang when no tickless
When the tickless kernel isn't used, we don't want to wait for ARROK. This wait can be endless. Signed-off-by: Julien D'Ascenzio <julien.dascenzio@paratronic.fr>
This commit is contained in:
parent
e20d7890ef
commit
b976e76866
1 changed files with 1 additions and 1 deletions
|
@ -178,6 +178,7 @@ int z_clock_driver_init(struct device *device)
|
|||
|
||||
void z_clock_set_timeout(s32_t ticks, bool idle)
|
||||
{
|
||||
#ifdef CONFIG_TICKLESS_KERNEL
|
||||
/* new LPTIM1 AutoReload value to set (aligned on Kernel ticks) */
|
||||
u32_t next_arr = 0;
|
||||
|
||||
|
@ -188,7 +189,6 @@ void z_clock_set_timeout(s32_t ticks, bool idle)
|
|||
}
|
||||
LL_LPTIM_ClearFlag_ARROK(LPTIM1);
|
||||
|
||||
#ifdef CONFIG_TICKLESS_KERNEL
|
||||
if (ticks == K_TICKS_FOREVER) {
|
||||
/* disable LPTIM */
|
||||
LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_LPTIM1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue