mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 09:39:10 -04:00
sleep: fix checking length of RTC data sections
_rtc_data_{start,end} can now describe data placed into RTC_FAST segment, if CONFIG_ESP32_RTCDATA_IN_FAST_MEM is enabled. Use new _rtc_slow_length symbol instead.
This commit is contained in:
parent
70412928de
commit
c4a712b0bc
@ -637,15 +637,11 @@ static uint32_t get_power_down_flags()
|
|||||||
// If there is any data placed into .rtc.data or .rtc.bss segments, and
|
// If there is any data placed into .rtc.data or .rtc.bss segments, and
|
||||||
// RTC_SLOW_MEM is Auto, keep it powered up as well.
|
// RTC_SLOW_MEM is Auto, keep it powered up as well.
|
||||||
|
|
||||||
// These labels are defined in the linker script:
|
// Labels are defined in the linker script, see esp32.ld.
|
||||||
extern int _rtc_data_start, _rtc_data_end,
|
extern int _rtc_slow_length;
|
||||||
_rtc_bss_start, _rtc_bss_end,
|
|
||||||
_rtc_noinit_start, _rtc_noinit_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 ||
|
((size_t) &_rtc_slow_length > 0 ||
|
||||||
&_rtc_bss_end > &_rtc_bss_start ||
|
|
||||||
&_rtc_noinit_end > &_rtc_noinit_start ||
|
|
||||||
(s_config.wakeup_triggers & RTC_ULP_TRIG_EN))) {
|
(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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user