summaryrefslogtreecommitdiff
path: root/hw/bsp/maxim
diff options
context:
space:
mode:
authorZixun LI <[email protected]>2025-11-25 15:54:45 +0100
committerZixun LI <[email protected]>2025-11-25 16:30:32 +0100
commit8221ea220bb523b3d8c6bab915a968477a228a16 (patch)
treec05dd51eb4ff2daa007b6c5195148a6019916c20 /hw/bsp/maxim
parentfee2d2a034d65aa625bc1a8b32c3b7a51292a39f (diff)
bsp: Disable SysTick ISR if FreeRTOS is enabled
Diffstat (limited to 'hw/bsp/maxim')
-rw-r--r--hw/bsp/maxim/family.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/bsp/maxim/family.c b/hw/bsp/maxim/family.c
index 92b5adb6d..7ad7d6ff9 100644
--- a/hw/bsp/maxim/family.c
+++ b/hw/bsp/maxim/family.c
@@ -66,6 +66,8 @@ void board_init(void) {
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
+ // Explicitly disable systick to prevent its ISR from running before scheduler start
+ SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
#endif