Skip to content

Commit 39d3878

Browse files
committed
soc: st: stm32: h7rsx: Disable voltage scaling config during XiP
Disables setting the VOLTAGE_SCALE1 (VOS1) during soc_early_init_hook() when CONFIG_STM32_APP_IN_EXT_FLASH is set. Signed-off-by: Thomas Decker <[email protected]>
1 parent c102a8e commit 39d3878

File tree

1 file changed

+5
-0
lines changed
  • soc/st/stm32/stm32h7rsx

1 file changed

+5
-0
lines changed

soc/st/stm32/stm32h7rsx/soc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,14 @@ void soc_early_init_hook(void)
5555
#else
5656
LL_PWR_ConfigSupply(LL_PWR_LDO_SUPPLY);
5757
#endif
58+
59+
/* The chain-loaded application must not switch to LL_PWR_REGU_VOLTAGE_SCALE1, because the
60+
* bootloader most likely setup a fast core clock. */
61+
#if !defined(CONFIG_STM32_APP_IN_EXT_FLASH)
5862
LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
5963
while (LL_PWR_IsActiveFlag_VOSRDY() == 0) {
6064
}
65+
#endif /* defined(CONFIG_STM32_APP_IN_EXT_FLASH) */
6166

6267
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpioo), okay) || DT_NODE_HAS_STATUS(DT_NODELABEL(gpiop), okay)
6368
LL_PWR_EnableXSPIM1(); /* Required for powering GPIO O and P */

0 commit comments

Comments
 (0)