1
0

Change 7 segment refresrate to 2ms

This commit is contained in:
Arti Zirk 2021-08-22 22:39:34 +03:00
parent 9c28d33e41
commit 32177827a1

2
main.c
View File

@ -140,7 +140,7 @@ static void tim_setup(void)
timer_set_mode(TIM2, TIM_CR1_CKD_CK_INT, TIM_CR1_CMS_EDGE, TIM_CR1_DIR_UP);
timer_set_prescaler(TIM2, (rcc_apb1_frequency*2) / 1000000 - 1); // set timer tickrate to 1mhz
timer_set_period(TIM2, 3000); // 1 ms
timer_set_period(TIM2, 2000); // 2ms
timer_enable_irq(TIM2, TIM_DIER_UIE);
// start displaying 7 segment numbers