stm32/powerctrlboot: Set HAL uwTickPrio variable when needed.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2022-01-31 16:39:26 +11:00
parent 14becd80c9
commit 4a4f269a1a
1 changed files with 5 additions and 0 deletions

View File

@ -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)