diff --git a/drivers/clock_control/clock_stm32_ll_common.h b/drivers/clock_control/clock_stm32_ll_common.h index 5bab50d2e0d..7fd5e5386ae 100644 --- a/drivers/clock_control/clock_stm32_ll_common.h +++ b/drivers/clock_control/clock_stm32_ll_common.h @@ -50,8 +50,9 @@ void config_plli2s(void); #endif void config_enable_default_clocks(void); -/* function exported to the soc power.c */ +/* functions exported to the soc power.c */ int stm32_clock_control_init(const struct device *dev); +void stm32_clock_control_standby_exit(void); #ifdef __cplusplus } diff --git a/drivers/timer/stm32_lptim_timer.c b/drivers/timer/stm32_lptim_timer.c index c94be66b80e..90c75fb709c 100644 --- a/drivers/timer/stm32_lptim_timer.c +++ b/drivers/timer/stm32_lptim_timer.c @@ -550,14 +550,21 @@ static int sys_clock_driver_init(void) return 0; } -void sys_clock_idle_exit(void) +void stm32_clock_control_standby_exit(void) { #ifdef CONFIG_STM32_LPTIM_STDBY_TIMER if (clock_control_get_status(clk_ctrl, (clock_control_subsys_t) &lptim_clk[0]) != CLOCK_CONTROL_STATUS_ON) { sys_clock_driver_init(); - } else if (timeout_stdby) { + } +#endif /* CONFIG_STM32_LPTIM_STDBY_TIMER */ +} + +void sys_clock_idle_exit(void) +{ +#ifdef CONFIG_STM32_LPTIM_STDBY_TIMER + if (timeout_stdby) { cycle_t missed_lptim_cnt; uint32_t stdby_timer_diff, stdby_timer_post, dticks; uint64_t stdby_timer_us; diff --git a/soc/st/stm32/stm32wbax/power.c b/soc/st/stm32/stm32wbax/power.c index 1565c59cfc6..ebb6d779a7b 100644 --- a/soc/st/stm32/stm32wbax/power.c +++ b/soc/st/stm32/stm32wbax/power.c @@ -118,7 +118,7 @@ static void set_mode_suspend_to_ram(void) /* Execution is restored at this point after wake up */ /* Restore system clock as soon as we exit standby mode */ - sys_clock_idle_exit(); + stm32_clock_control_standby_exit(); } #endif