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 <erwan.gouriou@st.com>
This commit is contained in:
Erwan Gouriou 2023-07-25 15:33:12 +02:00 committed by Fabio Baltieri
parent 58ba0e1e26
commit d06c93f24c

View file

@ -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);