mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-29 18:27:20 +02:00
Merge branch 'fix/fix_sleep_reject_on_esp32_v5.4' into 'release/v5.4'
fix(esp_hw_support): fix short duration sleep requests rejected in pd_flash lightsleep(v5.4) See merge request espressif/esp-idf!38226
This commit is contained in:
@ -203,9 +203,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Minimal amount of time we can sleep for
|
||||
#define LIGHT_SLEEP_MIN_TIME_US 200
|
||||
|
||||
#define RTC_MODULE_SLEEP_PREPARE_CYCLES (6)
|
||||
|
||||
#define CHECK_SOURCE(source, value, mask) ((s_config.wakeup_triggers & mask) && \
|
||||
@ -1442,8 +1439,8 @@ esp_err_t esp_light_sleep_start(void)
|
||||
* 4. All the adjustment time which is s_config.sleep_time_adjustment below.
|
||||
*/
|
||||
const uint32_t vddsdio_pd_sleep_duration = MAX(FLASH_PD_MIN_SLEEP_TIME_US,
|
||||
flash_enable_time_us + LIGHT_SLEEP_MIN_TIME_US + s_config.sleep_time_adjustment
|
||||
+ rtc_time_slowclk_to_us(RTC_MODULE_SLEEP_PREPARE_CYCLES, s_config.rtc_clk_cal_period));
|
||||
flash_enable_time_us + s_config.sleep_time_adjustment
|
||||
+ rtc_time_slowclk_to_us(RTC_MODULE_SLEEP_PREPARE_CYCLES + RTC_CNTL_MIN_SLP_VAL_MIN, s_config.rtc_clk_cal_period));
|
||||
|
||||
if (can_power_down_vddsdio(sleep_flags, vddsdio_pd_sleep_duration)) {
|
||||
if (s_config.sleep_time_overhead_out < flash_enable_time_us) {
|
||||
|
Reference in New Issue
Block a user