Merge branch 'change/allow_keep_sar_poweron_in_light_sleep' into 'master'

change(esp_hw_support): allow sar power keep on during lightsleep

Closes IDFGH-11268

See merge request espressif/esp-idf!38379
This commit is contained in:
Wu Zheng Hui
2025-04-15 14:47:55 +08:00

View File

@@ -707,7 +707,7 @@ FORCE_INLINE_ATTR void misc_modules_sleep_prepare(uint32_t sleep_flags, bool dee
#endif
}
if (!(deep_sleep && (s_sleep_sub_mode_ref_cnt[ESP_SLEEP_USE_ADC_TSEN_MONITOR_MODE] != 0))){
if (s_sleep_sub_mode_ref_cnt[ESP_SLEEP_USE_ADC_TSEN_MONITOR_MODE] == 0) {
// TODO: IDF-7370
sar_periph_ctrl_power_disable();
}
@@ -737,7 +737,9 @@ FORCE_INLINE_ATTR void misc_modules_wake_prepare(uint32_t sleep_flags)
sleep_usb_otg_phy_restore();
}
#endif
if (s_sleep_sub_mode_ref_cnt[ESP_SLEEP_USE_ADC_TSEN_MONITOR_MODE] == 0) {
sar_periph_ctrl_power_enable();
}
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP && SOC_PM_CPU_RETENTION_BY_RTCCNTL
sleep_disable_cpu_retention();
#endif