Skip to content

Commit af7a18b

Browse files
committed
stm32/powerctrlboot: Fix configuration of SysTick for H5.
Signed-off-by: Damien George <damien@micropython.org>
1 parent 39fd8eb commit af7a18b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ports/stm32/powerctrlboot.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void powerctrl_config_systick(void) {
5252
SysTick_Config(HAL_RCC_GetHCLKFreq() / 1000);
5353
NVIC_SetPriority(SysTick_IRQn, IRQ_PRI_SYSTICK);
5454

55-
#if !BUILDING_MBOOT && (defined(STM32H7) || defined(STM32L4) || defined(STM32WB))
55+
#if !BUILDING_MBOOT && (defined(STM32H5) || defined(STM32H7) || defined(STM32L4) || defined(STM32WB))
5656
// Set SysTick IRQ priority variable in case the HAL needs to use it
5757
uwTickPrio = IRQ_PRI_SYSTICK;
5858
#endif
@@ -236,6 +236,10 @@ void SystemClock_Config(void) {
236236
// Switch the system clock source to PLL1P.
237237
LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL1);
238238

239+
// Reconfigure clock state and SysTick.
240+
SystemCoreClockUpdate();
241+
powerctrl_config_systick();
242+
239243
// Configure PLL3 for use by USB at Q=48MHz.
240244
LL_RCC_PLL3_SetSource(LL_RCC_PLL3SOURCE_HSE);
241245
LL_RCC_PLL3_SetM(MICROPY_HW_CLK_PLL3M);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy