summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-01-31 16:39:26 +1100
committerDamien George <damien@micropython.org>2022-01-31 18:26:55 +1100
commit4a4f269a1ae0e23c0d9815c7f8b1b7ff6ba22cc1 (patch)
tree3a49032cea52ef08bf112d881862b7263fd3f9b5
parent14becd80c9587e7afed56aebab4bf347971ff6e4 (diff)
stm32/powerctrlboot: Set HAL uwTickPrio variable when needed.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/stm32/powerctrlboot.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/stm32/powerctrlboot.c b/ports/stm32/powerctrlboot.c
index caa563292..41b56296e 100644
--- a/ports/stm32/powerctrlboot.c
+++ b/ports/stm32/powerctrlboot.c
@@ -33,6 +33,11 @@ void powerctrl_config_systick(void) {
SysTick->CTRL |= SYSTICK_CLKSOURCE_HCLK;
SysTick_Config(HAL_RCC_GetHCLKFreq() / 1000);
NVIC_SetPriority(SysTick_IRQn, IRQ_PRI_SYSTICK);
+
+ #if !BUILDING_MBOOT && (defined(STM32H7) || defined(STM32L4) || defined(STM32WB))
+ // Set SysTick IRQ priority variable in case the HAL needs to use it
+ uwTickPrio = IRQ_PRI_SYSTICK;
+ #endif
}
#if defined(STM32F0)