diff options
| author | Zixun LI <[email protected]> | 2025-11-25 15:54:45 +0100 |
|---|---|---|
| committer | Zixun LI <[email protected]> | 2025-11-25 16:30:32 +0100 |
| commit | 8221ea220bb523b3d8c6bab915a968477a228a16 (patch) | |
| tree | c05dd51eb4ff2daa007b6c5195148a6019916c20 /hw/bsp/lpc17 | |
| parent | fee2d2a034d65aa625bc1a8b32c3b7a51292a39f (diff) | |
bsp: Disable SysTick ISR if FreeRTOS is enabled
Diffstat (limited to 'hw/bsp/lpc17')
| -rw-r--r-- | hw/bsp/lpc17/family.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/bsp/lpc17/family.c b/hw/bsp/lpc17/family.c index 1edab6cd4..ba59fccca 100644 --- a/hw/bsp/lpc17/family.c +++ b/hw/bsp/lpc17/family.c @@ -54,6 +54,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 |
