From 0e91b71aae9267a69913cd23e6fe9fdf168ce08d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Wed, 25 May 2022 19:58:08 +0200 Subject: [PATCH] app: improve RGB panel refresh rate --- application.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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