aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32/stm32-h103/pwm_6step/pwm_6step.c')
-rw-r--r--examples/stm32/stm32-h103/pwm_6step/pwm_6step.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c b/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c
index cf53ac6..505b3c8 100644
--- a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c
+++ b/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c
@@ -121,6 +121,9 @@ void tim_setup(void)
/* Enable TIM1 commutation interrupt. */
nvic_enable_irq(NVIC_TIM1_TRG_COM_IRQ);
+ /* Reset TIM1 peripheral */
+ timer_reset(TIM1);
+
/* Clock division. */
timer_set_clock_division(TIM1, TIM_CR1_CKD_CK_INT);