aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c
diff options
context:
space:
mode:
authorPiotr Esden-Tempski2011-01-31 16:30:12 -0800
committerPiotr Esden-Tempski2011-01-31 16:30:12 -0800
commit92edc113f9825f333ea66e41e8fcdbeb45da9cd6 (patch)
tree29fdc2f094b5ce5f0ce6f2cd05b1f758911612e9 /examples/stm32/stm32-h103/pwm_6step/pwm_6step.c
parente85c55a9a70f8f357aceba4cbacd7762ca773d7b (diff)
Added timer reset function.
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);