From d06c93f24c3a96d2b582013b4cbde8f4b7230e12 Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Tue, 25 Jul 2023 15:33:12 +0200 Subject: [PATCH] drivers: clock_control: stm32wba: Apply VOS range 2 when sysclock = 16MHz When sysclock is 16MHz, we're allowed to used VOS range 2. Signed-off-by: Erwan Gouriou --- drivers/clock_control/clock_stm32_ll_wba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clock_control/clock_stm32_ll_wba.c b/drivers/clock_control/clock_stm32_ll_wba.c index 46b834c52e..8b9da70017 100644 --- a/drivers/clock_control/clock_stm32_ll_wba.c +++ b/drivers/clock_control/clock_stm32_ll_wba.c @@ -287,7 +287,7 @@ static int get_vco_input_range(uint32_t m_div, uint32_t *range) static void set_regu_voltage(uint32_t hclk_freq) { - if (hclk_freq < MHZ(16)) { + if (hclk_freq <= MHZ(16)) { LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2); } else { LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);