Merge branch 'fix/rtc_fast_memory_force_on_in_use_for_heap' into 'master'

fix: RTC_FAST_MEM always power on if used for heap

See merge request espressif/esp-idf!11555
This commit is contained in:
Ivan Grokhotkov
2020-12-15 18:45:20 +08:00

View File

@@ -869,14 +869,17 @@ static uint32_t get_power_down_flags(void)
} }
#endif #endif
// RTC_FAST_MEM is needed for deep sleep stub. #if !CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP && !CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP && !CONFIG_ESP32S3_ALLOW_RTC_FAST_MEM_AS_HEAP
// If RTC_FAST_MEM is Auto, keep it powered on, so that deep sleep stub /* RTC_FAST_MEM is needed for deep sleep stub.
// can run. If RTC_FAST_MEM is Auto, keep it powered on, so that deep sleep stub can run.
// In the new chip revision, deep sleep stub will be optional, In the new chip revision, deep sleep stub will be optional, and this can be changed. */
// and this can be changed.
if (s_config.pd_options[ESP_PD_DOMAIN_RTC_FAST_MEM] == ESP_PD_OPTION_AUTO) { if (s_config.pd_options[ESP_PD_DOMAIN_RTC_FAST_MEM] == ESP_PD_OPTION_AUTO) {
s_config.pd_options[ESP_PD_DOMAIN_RTC_FAST_MEM] = ESP_PD_OPTION_ON; s_config.pd_options[ESP_PD_DOMAIN_RTC_FAST_MEM] = ESP_PD_OPTION_ON;
} }
#else
/* If RTC_FAST_MEM is used for heap, force RTC_FAST_MEM to be powered on. */
s_config.pd_options[ESP_PD_DOMAIN_RTC_FAST_MEM] = ESP_PD_OPTION_ON;
#endif
// RTC_PERIPH is needed for EXT0 wakeup and GPIO wakeup. // RTC_PERIPH is needed for EXT0 wakeup and GPIO wakeup.
// If RTC_PERIPH is auto, and EXT0/GPIO aren't enabled, power down RTC_PERIPH. // If RTC_PERIPH is auto, and EXT0/GPIO aren't enabled, power down RTC_PERIPH.