Added timer reset function.

This commit is contained in:
Piotr Esden-Tempski
2011-01-31 16:30:12 -08:00
parent e85c55a9a7
commit 92edc113f9
3 changed files with 71 additions and 0 deletions

View File

@@ -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);