diff --git a/arch/arm/src/stm32/stm32_tim_lowerhalf.c b/arch/arm/src/stm32/stm32_tim_lowerhalf.c index d0a9619517e..0c6ead4607c 100644 --- a/arch/arm/src/stm32/stm32_tim_lowerhalf.c +++ b/arch/arm/src/stm32/stm32_tim_lowerhalf.c @@ -270,7 +270,7 @@ static int stm32_timer_handler(int irq, void * context, void * arg) FAR struct stm32_lowerhalf_s *lower = (struct stm32_lowerhalf_s *) arg; uint32_t next_interval_us = 0; - STM32_TIM_ACKINT(lower->tim, 0); + STM32_TIM_ACKINT(lower->tim, ATIM_DIER_UIE); if (lower->callback(&next_interval_us, lower->arg)) { @@ -313,7 +313,7 @@ static int stm32_start(FAR struct timer_lowerhalf_s *lower) if (priv->callback != NULL) { STM32_TIM_SETISR(priv->tim, stm32_timer_handler, priv, 0); - STM32_TIM_ENABLEINT(priv->tim, 0); + STM32_TIM_ENABLEINT(priv->tim, ATIM_DIER_UIE); } priv->started = true; @@ -347,7 +347,7 @@ static int stm32_stop(struct timer_lowerhalf_s *lower) if (priv->started) { STM32_TIM_SETMODE(priv->tim, STM32_TIM_MODE_DISABLED); - STM32_TIM_DISABLEINT(priv->tim, 0); + STM32_TIM_DISABLEINT(priv->tim, ATIM_DIER_UIE); STM32_TIM_SETISR(priv->tim, NULL, NULL, 0); priv->started = false; return OK; @@ -435,11 +435,11 @@ static void stm32_setcallback(FAR struct timer_lowerhalf_s *lower, if (callback != NULL && priv->started) { STM32_TIM_SETISR(priv->tim, stm32_timer_handler, priv, 0); - STM32_TIM_ENABLEINT(priv->tim, 0); + STM32_TIM_ENABLEINT(priv->tim, ATIM_DIER_UIE); } else { - STM32_TIM_DISABLEINT(priv->tim, 0); + STM32_TIM_DISABLEINT(priv->tim, ATIM_DIER_UIE); STM32_TIM_SETISR(priv->tim, NULL, NULL, 0); }