summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-11-02 10:49:41 +0700
committerGitHub <[email protected]>2021-11-02 10:49:41 +0700
commitb4a0f0b273eee32ead7acbd44ca9554c58a2adfa (patch)
treec1f1cf5eb6e93f4a29e37a8607a0c63b23df53b1
parent9245b8f89f52412ca53854ac4e3b2b855f38f6bb (diff)
parent5fb16a8f2c2c160e9e3e3c1161b038b6fc421c14 (diff)
Merge pull request #1176 from jgressmann/bugfix/samd21-systick
samd21: enable SysTick only if running w/o OS
-rw-r--r--hw/bsp/samd21/family.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/bsp/samd21/family.c b/hw/bsp/samd21/family.c
index 3fa6ea7d8..cead582e9 100644
--- a/hw/bsp/samd21/family.c
+++ b/hw/bsp/samd21/family.c
@@ -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