From 92edc113f9825f333ea66e41e8fcdbeb45da9cd6 Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Mon, 31 Jan 2011 16:30:12 -0800 Subject: Added timer reset function. --- examples/stm32/stm32-h103/pwm_6step/pwm_6step.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'examples/stm32/stm32-h103/pwm_6step') 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); -- cgit v1.2.3