diff --git a/cpu/stm32/periph/timer.c b/cpu/stm32/periph/timer.c index 64d929b40e..a09c601c94 100644 --- a/cpu/stm32/periph/timer.c +++ b/cpu/stm32/periph/timer.c @@ -149,6 +149,10 @@ int timer_set_periodic(tim_t tim, int channel, unsigned int value, uint8_t flags clear_oneshot(tim, channel); + if (flags & TIM_FLAG_SET_STOPPED) { + timer_stop(tim); + } + if (flags & TIM_FLAG_RESET_ON_SET) { /* setting COUNT gives us an interrupt on all channels */ unsigned state = irq_disable();