sleep_mode/esp32: Fix a condition to keep power domain enabled during sleep mode

This commit is contained in:
Konstantin Kondrashov 2018-06-06 16:50:28 +05:00
parent d441dd32ea
commit 28507920c8

View file

@ -599,9 +599,9 @@ static uint32_t get_power_down_flags()
// These labels are defined in the linker script: // These labels are defined in the linker script:
extern int _rtc_data_start, _rtc_data_end, _rtc_bss_start, _rtc_bss_end; extern int _rtc_data_start, _rtc_data_end, _rtc_bss_start, _rtc_bss_end;
if (s_config.pd_options[ESP_PD_DOMAIN_RTC_SLOW_MEM] == ESP_PD_OPTION_AUTO || if ((s_config.pd_options[ESP_PD_DOMAIN_RTC_SLOW_MEM] == ESP_PD_OPTION_AUTO) &&
&_rtc_data_end > &_rtc_data_start || (&_rtc_data_end > &_rtc_data_start || &_rtc_bss_end > &_rtc_bss_start ||
&_rtc_bss_end > &_rtc_bss_start) { (s_config.wakeup_triggers & RTC_ULP_TRIG_EN))) {
s_config.pd_options[ESP_PD_DOMAIN_RTC_SLOW_MEM] = ESP_PD_OPTION_ON; s_config.pd_options[ESP_PD_DOMAIN_RTC_SLOW_MEM] = ESP_PD_OPTION_ON;
} }