Browse Source

Matrix: Systick, please

master
Martin Mareš 2 months ago
parent
commit
de8f60e79a
  1. 4
      src/matrix/matrix.c

4
src/matrix/matrix.c

@ -67,6 +67,10 @@ int main(void)
rcc_periph_clock_enable(RCC_GPIOB); rcc_periph_clock_enable(RCC_GPIOB);
rcc_periph_clock_enable(RCC_GPIOC); rcc_periph_clock_enable(RCC_GPIOC);
systick_set_clocksource(STK_CSR_CLKSOURCE_AHB);
systick_set_reload(71999);
systick_counter_enable();
// PC13 = BluePill LED // PC13 = BluePill LED
gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO13); gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO13);

Loading…
Cancel
Save