From de8f60e79a8298d141c18d0f2dab5214cea780b9 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 18 Sep 2024 10:47:44 +0200 Subject: [PATCH] Matrix: Systick, please --- src/matrix/matrix.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/matrix/matrix.c b/src/matrix/matrix.c index d0b3720..28e4166 100644 --- a/src/matrix/matrix.c +++ b/src/matrix/matrix.c @@ -67,6 +67,10 @@ int main(void) rcc_periph_clock_enable(RCC_GPIOB); rcc_periph_clock_enable(RCC_GPIOC); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB); + systick_set_reload(71999); + systick_counter_enable(); + // PC13 = BluePill LED gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO13);