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

This commit is contained in:
wuzhenghui
2025-04-15 22:00:24 +08:00
parent cc29434655
commit f421ec9443

View File

@@ -437,7 +437,7 @@ inline static void IRAM_ATTR misc_modules_sleep_prepare(bool deep_sleep)
regi2c_analog_cali_reg_read(); regi2c_analog_cali_reg_read();
#endif #endif
} }
if (!(deep_sleep && s_adc_tsen_enabled)) { if (!s_adc_tsen_enabled) {
sar_periph_ctrl_power_disable(); sar_periph_ctrl_power_disable();
} }
} }
@@ -450,7 +450,9 @@ inline static void IRAM_ATTR misc_modules_wake_prepare(void)
#if SOC_USB_SERIAL_JTAG_SUPPORTED && !SOC_USB_SERIAL_JTAG_SUPPORT_LIGHT_SLEEP #if SOC_USB_SERIAL_JTAG_SUPPORTED && !SOC_USB_SERIAL_JTAG_SUPPORT_LIGHT_SLEEP
sleep_console_usj_pad_restore(); sleep_console_usj_pad_restore();
#endif #endif
if (!s_adc_tsen_enabled) {
sar_periph_ctrl_power_enable(); sar_periph_ctrl_power_enable();
}
#if SOC_PM_SUPPORT_CPU_PD || SOC_PM_SUPPORT_TAGMEM_PD #if SOC_PM_SUPPORT_CPU_PD || SOC_PM_SUPPORT_TAGMEM_PD
sleep_disable_memory_retention(); sleep_disable_memory_retention();
#endif #endif