Skip to content

Commit 1ec41ce

Browse files
erwangocfriedt
authored andcommitted
drivers/clock_control: stm32u5: Fix VCO setting
When existing stop mode 1&2, VCO is set to range 4 and should be set back to range 1 to allow full speed operations. Rather than setting VCO at startup, set it inside clock setting procedure so that it could done in clock reset procedure when existing stop modes. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent f896932 commit 1ec41ce

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/clock_control/clock_stm32_ll_u5.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@ void config_src_sysclk_pll(LL_UTILS_ClkInitTypeDef s_ClkInitStruct)
324324
STM32_PLL_N_MULTIPLIER,
325325
STM32_PLL_R_DIVISOR);
326326

327+
LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
328+
while (LL_PWR_IsActiveFlag_VOS() == 0) {
329+
}
330+
327331
if (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC >= 55) {
328332
/*
329333
* Set EPOD prescaler based on PLL1 input freq (MSI/PLLM)

soc/arm/st_stm32/stm32u5/soc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ static int stm32u5_init(const struct device *arg)
5959
/* Disable USB Type-C dead battery pull-down behavior */
6060
LL_PWR_DisableUCPDDeadBattery();
6161

62-
LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
63-
6462
return 0;
6563
}
6664

0 commit comments

Comments
 (0)