~ruther/stm32h747i-disco-usb-image-viewer

ref: 9cb6ab52fc2b86956e5f74a8630a3aaf79411f29 stm32h747i-disco-usb-image-viewer/src/delay.c -rw-r--r-- 304 bytes
9cb6ab52 — Rutherther feat: vos0, system clock at 480 MHz 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "delay.h"
#include <stm32h7xx.h>

uint32_t us_ticks;

void systick_configure() {
  SysTick->LOAD = SYSTICK_LOAD;
  SysTick->VAL = 0;
  SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk; //| SysTick_CTRL_TICKINT_Msk;
  us_ticks = 0;
}

void systick_handler() {
  us_ticks++;
}
Do not follow this link