diff --git a/application.c b/application.c index 431bffe..d3c2c64 100644 --- a/application.c +++ b/application.c @@ -820,7 +820,7 @@ void main(void) rcc_periph_reset_pulse(RST_TIM(RGBMATRIX_TIMER)); // reset timer state timer_set_mode(TIM(RGBMATRIX_TIMER), TIM_CR1_CKD_CK_INT, TIM_CR1_CMS_EDGE, TIM_CR1_DIR_UP); // set timer mode, use undivided timer clock, edge alignment (simple count), and count up timer_set_prescaler(TIM(RGBMATRIX_TIMER), 2 - 1); // hand tuned prescale to minimize inter-line ghosting - timer_set_period(TIM(RGBMATRIX_TIMER), 0xcfff - 1); // hand tuned period to minimize inter-line ghosting + timer_set_period(TIM(RGBMATRIX_TIMER), 0x9fff - 1); // hand tuned period to minimize inter-line ghosting timer_clear_flag(TIM(RGBMATRIX_TIMER), TIM_SR_UIF); // clear update (overflow) flag timer_update_on_overflow(TIM(RGBMATRIX_TIMER)); // only use counter overflow as UEV source (use overflow as next line update indication) timer_enable_irq(TIM(RGBMATRIX_TIMER), TIM_DIER_UIE); // enable update interrupt for timer