system/sleep: further fix spi flash/ram current leakage
This commit is contained in:
committed by
Jiang Jiang Jian
parent
3c2c9206dd
commit
66395a5c00
@@ -171,7 +171,7 @@ By default, :cpp:func:`esp_deep_sleep_start` and :cpp:func:`esp_light_sleep_star
|
||||
Power-down of Flash
|
||||
-------------------
|
||||
|
||||
By default, to avoid potential issues, :cpp:func:`esp_deep_sleep_start` and :cpp:func:`esp_light_sleep_start` functions will **not** power down flash. To be more specific, it takes time to power down the flash and during this period the system may be woken up, which then actually powers up the flash before this flash could be powered down completely. As a result, there is a chance that the flash may not work properly.
|
||||
By default, to avoid potential issues, :cpp:func:`esp_light_sleep_start` function will **not** power down flash. To be more specific, it takes time to power down the flash and during this period the system may be woken up, which then actually powers up the flash before this flash could be powered down completely. As a result, there is a chance that the flash may not work properly.
|
||||
|
||||
So, in theory, it's ok if you only wake up the system after the flash is completely powered down. However, in reality, the flash power-down period can be hard to predict (for example, this period can be much longer when you add filter capacitors to the flash's power supply circuit) and uncontrollable (for example, the asynchronous wake-up signals make the actual sleep time uncontrollable).
|
||||
|
||||
@@ -192,7 +192,11 @@ However, for those who have fully understood the risk and are still willing to p
|
||||
- Calling ``esp_sleep_pd_config(ESP_PD_DOMAIN_VDDSDIO, ESP_PD_OPTION_OFF)`` powers down flash when the RTC timer is not enabled as a wakeup source **or** the sleep time is longer than the flash power-down period.
|
||||
|
||||
.. note::
|
||||
ESP-IDF does not provide any mechanism that can power down the flash in all conditions.
|
||||
|
||||
.. list::
|
||||
|
||||
- ESP-IDF does not provide any mechanism that can power down the flash in all conditions when light sleep.
|
||||
- :cpp:func:`esp_deep_sleep_start` function will force power down flash regardless of user configuration.
|
||||
|
||||
Entering Light-sleep
|
||||
--------------------
|
||||
|
||||
@@ -171,7 +171,7 @@ RTC 外设和内存断电
|
||||
Flash 断电
|
||||
----------
|
||||
|
||||
默认情况下,调用函数 :cpp:func:`esp_deep_sleep_start` 和 :cpp:func:`esp_light_sleep_start` 后, **不会** 断电 flash。在 sleep 过程中断电 flash 存在风险。因为 flash 断电需要时间,但是在此期间,系统有可能被唤醒。此时 flash 重新被上电,断电尚未完成又重新上电的硬件行为有概率导致 flash 不能正常工作。如果用户为 flash 供电电路添加了滤波电容,断电所需时间可能会更长。此外,即使可以预知 flash 彻底断电所需的时间,有时也不能通过设置足够长的睡眠时间来确保 flash 断电的安全(比如,突发的异步唤醒源会使得实际的睡眠时间不可控)。
|
||||
默认情况下,调用函数 :cpp:func:`esp_light_sleep_start` 后, **不会** 断电 flash。在 sleep 过程中断电 flash 存在风险。因为 flash 断电需要时间,但是在此期间,系统有可能被唤醒。此时 flash 重新被上电,断电尚未完成又重新上电的硬件行为有概率导致 flash 不能正常工作。如果用户为 flash 供电电路添加了滤波电容,断电所需时间可能会更长。此外,即使可以预知 flash 彻底断电所需的时间,有时也不能通过设置足够长的睡眠时间来确保 flash 断电的安全(比如,突发的异步唤醒源会使得实际的睡眠时间不可控)。
|
||||
|
||||
.. warning::
|
||||
如果在 flash 的供电电路上添加了滤波电容,那么应当尽一切可能避免 flash 断电。
|
||||
@@ -190,7 +190,11 @@ Flash 断电
|
||||
- 调用函数 ``esp_sleep_pd_config(ESP_PD_DOMAIN_VDDSDIO, ESP_PD_OPTION_OFF)`` 将使 ESP-IDF 以一个宽松的条件来断电 flash。宽松的条件具体指的是 RTC timer 唤醒源未被使能 **或** 睡眠时间比 flash 彻底断电所需时间更长。
|
||||
|
||||
.. note::
|
||||
ESP-IDF 并未提供保证 flash 一定会被断电的机制。
|
||||
|
||||
.. list::
|
||||
|
||||
- Light sleep 时,ESP-IDF 并未提供保证 flash 一定会被断电的机制。
|
||||
- 不管用户的配置如何,函数 :cpp:func:`esp_deep_sleep_start` 都会强制断电 flash。
|
||||
|
||||
进入 Light-sleep 模式
|
||||
-------------------------
|
||||
|
||||
Reference in New Issue
Block a user