summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/stm32_it.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/stm32_it.c')
-rw-r--r--stmhal/stm32_it.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stmhal/stm32_it.c b/stmhal/stm32_it.c
index a6503d3100..4dddc5e0ba 100644
--- a/stmhal/stm32_it.c
+++ b/stmhal/stm32_it.c
@@ -289,10 +289,12 @@ void SysTick_Handler(void) {
dma_idle_handler(uwTick);
}
+ #if MICROPY_PY_THREAD
// signal a thread switch at 4ms=250Hz
if (pyb_thread_enabled && (uwTick & 0x03) == 0x03) {
SCB->ICSR = SCB_ICSR_PENDSVSET_Msk;
}
+ #endif
}
/******************************************************************************/