feat(esp_hw_support): remeasure sleep_time_overhead_out if min_freq_mhz changed

This commit is contained in:
wuzhenghui
2025-05-07 11:42:35 +08:00
parent 1b47abed1b
commit 61e32da02c
3 changed files with 35 additions and 3 deletions
+2
View File
@@ -18,6 +18,7 @@
#include "esp_clk_tree.h"
#include "soc/soc_caps.h"
#include "esp_private/esp_sleep_internal.h"
#include "esp_private/crosscore_int.h"
#include "esp_private/periph_ctrl.h"
@@ -477,6 +478,7 @@ esp_err_t esp_pm_configure(const void* vconfig)
// Enable the wakeup source here because the `esp_sleep_disable_wakeup_source` in the `else`
// branch must be called if corresponding wakeup source is already enabled.
esp_sleep_enable_timer_wakeup(0);
esp_sleep_overhead_out_time_refresh();
} else if (s_light_sleep_en) {
// Since auto light-sleep will enable the timer wakeup source, to avoid affecting subsequent possible
// deepsleep requests, disable the timer wakeup source here.