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 <erwan.gouriou@linaro.org>
This commit is contained in:
parent
f89693200f
commit
1ec41ce922
2 changed files with 4 additions and 2 deletions
|
@ -324,6 +324,10 @@ void config_src_sysclk_pll(LL_UTILS_ClkInitTypeDef s_ClkInitStruct)
|
|||
STM32_PLL_N_MULTIPLIER,
|
||||
STM32_PLL_R_DIVISOR);
|
||||
|
||||
LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
|
||||
while (LL_PWR_IsActiveFlag_VOS() == 0) {
|
||||
}
|
||||
|
||||
if (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC >= 55) {
|
||||
/*
|
||||
* Set EPOD prescaler based on PLL1 input freq (MSI/PLLM)
|
||||
|
|
|
@ -59,8 +59,6 @@ static int stm32u5_init(const struct device *arg)
|
|||
/* Disable USB Type-C dead battery pull-down behavior */
|
||||
LL_PWR_DisableUCPDDeadBattery();
|
||||
|
||||
LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue