Skip to content

Commit e1248ef

Browse files
marwaiehm-stdanieldegrasse
authored andcommitted
drivers: clock_control: set voltage scaling before PLL
Move the call to prepare_regulator_voltage_scale() before PLL setup in clock_stm32_ll_h7.c. This ensures the voltage regulator is configured to the appropriate voltage scale before increasing the system clock frequency via PLLs. Without this change, the system configuration may be out of spec. Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
1 parent 553fc84 commit e1248ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/clock_control/clock_stm32_ll_h7.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,15 +1011,15 @@ int stm32_clock_control_init(const struct device *dev)
10111011
/* Set up individual enabled clocks */
10121012
set_up_fixed_clock_sources();
10131013

1014+
/* Configure Voltage scale to comply with the desired system frequency */
1015+
prepare_regulator_voltage_scale();
1016+
10141017
/* Set up PLLs */
10151018
r = set_up_plls();
10161019
if (r < 0) {
10171020
return r;
10181021
}
10191022

1020-
/* Configure Voltage scale to comply with the desired system frequency */
1021-
prepare_regulator_voltage_scale();
1022-
10231023
/* Current hclk value */
10241024
old_hclk_freq = get_hclk_frequency();
10251025
/* AHB is HCLK clock to configure */

0 commit comments

Comments
 (0)