samd21: enable SysTick only if running w/o OS

This commit is contained in:
Jean Gressmann 2021-11-01 18:01:18 +01:00
parent 9245b8f89f
commit 5fb16a8f2c
1 changed files with 2 additions and 0 deletions

View File

@ -75,7 +75,9 @@ void board_init(void)
// Update SystemCoreClock since it is hard coded with asf4 and not correct
// Init 1ms tick timer (samd SystemCoreClock may not correct)
SystemCoreClock = CONF_CPU_FREQUENCY;
#if CFG_TUSB_OS == OPT_OS_NONE
SysTick_Config(CONF_CPU_FREQUENCY / 1000);
#endif
// Led init
#ifdef LED_PIN