-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTC memory is not automatically powered down, manual toggle is difficult (IDFGH-11098) #12270
Comments
@0ttoman Thank you for your report, in the description you are very correct in all your reasoning about the occurrence of this problem. These behaviors are expected, the structure Considering that the power consumption of rtc_mem is very small, less than 1.5uA, we think that the importance of system timer service is much more than that, so we prohibit rtc_mem from powering down by this mechanism. But if this 1.5uA power consumption is really important to your project, there is still a way to bypass it, you can change Regards. |
Can confirm this. This assert issue is the same for all the power domains in idf 5.1.1 |
@kiss81 All power domains default to ESP_PD_OPTION_AUTO, in auto mode, the sleep process will automatically power down a power domain if it determines that no module is dependent on it, so there is no need for the user to manually specify that the power domain be turned off during sleep. |
@kiss81 |
Hi @kiss81, do you still have this problem? Could you please share the latest update? Thanks. |
|
Thanks for sharing the updates, feel free to reopen. |
Answers checklist.
IDF version.
(master) 3b748a6
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32
Power Supply used.
USB
What is the expected behavior?
What is the actual behavior?
Because of the reference counter introduced in the esp_sleep_pd_config function, to be able to set a domain to ESP_PD_OPTION_OFF, you now have to call
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_ON);
beforeesp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_OFF);
. Is this anticipated? This behavior is also not documented.When ESP_PD_DOMAIN_RTC_SLOW_MEM is left to Auto disable the function get_power_down_flags() sets ESP_PD_DOMAIN_RTC_SLOW_MEM to ESP_PD_OPTION_ON when _rtc_reserved_length > 0:
The value is referenced in esp/section.ld.in:
esp_clk.c always declares a 24 byte struct, stored to .rtc_timer_data_in_rtc_mem
With this, _rtc_reserved_length is 24 and ESP_PD_DOMAIN_RTC_SLOW_MEM will always be powered on.
With SOC_PM_SUPPORT_RTC_FAST_MEM_PD true for my esp32,
ESP_PD_DOMAIN_RTC_FAST_MEM will always be set from ESP_PD_OPTION_AUTO to ESP_PD_OPTION_ON.
Steps to reproduce.
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_OFF);
beforeesp_deep_sleep_start();
will crash the system.Debug Logs.
No response
More Information.
old related issue
The text was updated successfully, but these errors were encountered: