diff options
| author | Damien George <damien@micropython.org> | 2022-01-31 16:39:26 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-01-31 18:26:55 +1100 |
| commit | 4a4f269a1ae0e23c0d9815c7f8b1b7ff6ba22cc1 (patch) | |
| tree | 3a49032cea52ef08bf112d881862b7263fd3f9b5 | |
| parent | 14becd80c9587e7afed56aebab4bf347971ff6e4 (diff) | |
stm32/powerctrlboot: Set HAL uwTickPrio variable when needed.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | ports/stm32/powerctrlboot.c | 5 |
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) |
