diff --git a/lib/led_tm1637.c b/lib/led_tm1637.c index cc96e13..de1cc4a 100644 --- a/lib/led_tm1637.c +++ b/lib/led_tm1637.c @@ -181,8 +181,7 @@ void led_tm1637_setup(void) timer_set_prescaler(TIM(LED_TM1637_TIMER), 0); // don't prescale to get most precise timing ( 1/(72E6/1/(2**16))=0.91 ms > 0.5 us ) timer_set_period(TIM(LED_TM1637_TIMER), 500); // set the clock frequency (emprical value until the signal starts to look bad) timer_clear_flag(TIM(LED_TM1637_TIMER), TIM_SR_UIF); // clear flag - //timer_update_on_overflow(TIM(LED_TM1637_TIMER)); // only use counter overflow as UEV source (use overflow as start time or timeout) - timer_enable_irq(TIM(LED_TM1637_TIMER), TIM_DIER_UIE); // enable update interrupt for timer to wake up (no ISR used) + timer_update_on_overflow(TIM(LED_TM1637_TIMER)); // only use counter overflow as UEV source (use overflow as start time or timeout) } /** wait until clock tick (timer overflow) occurred