Change 7 segment refresrate to 2ms
This commit is contained in:
parent
9c28d33e41
commit
32177827a1
2
main.c
2
main.c
@ -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_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_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);
|
timer_enable_irq(TIM2, TIM_DIER_UIE);
|
||||||
|
|
||||||
// start displaying 7 segment numbers
|
// start displaying 7 segment numbers
|
||||||
|
Loading…
Reference in New Issue
Block a user