mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
bugfix: fix deepsleep saradc leakage
This commit is contained in:
@ -332,7 +332,7 @@ static void IRAM_ATTR resume_uarts(void)
|
||||
/**
|
||||
* These save-restore workaround should be moved to lower layer
|
||||
*/
|
||||
inline static void IRAM_ATTR misc_modules_sleep_prepare(void)
|
||||
inline static void IRAM_ATTR misc_modules_sleep_prepare(bool deep_sleep)
|
||||
{
|
||||
#if CONFIG_MAC_BB_PD
|
||||
mac_bb_power_down_cb_execute();
|
||||
@ -346,8 +346,10 @@ inline static void IRAM_ATTR misc_modules_sleep_prepare(void)
|
||||
#if REGI2C_ANA_CALI_PD_WORKAROUND
|
||||
regi2c_analog_cali_reg_read();
|
||||
#endif
|
||||
if (!(deep_sleep && s_adc_tsen_enabled)){
|
||||
sar_periph_ctrl_power_disable();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* These save-restore workaround should be moved to lower layer
|
||||
@ -437,7 +439,7 @@ static uint32_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags)
|
||||
phy_close_rf();
|
||||
}
|
||||
} else {
|
||||
misc_modules_sleep_prepare();
|
||||
misc_modules_sleep_prepare(deep_sleep);
|
||||
}
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
|
||||
|
Reference in New Issue
Block a user