1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-07 16:23:38 +03:00

Add documentation on recovering from deep sleep with WAKE_RF_DISABLED (#7338)

* Clarify how to enable WiFi after DeepSleep

* Add FAQ item for recovering from DeepSleep

* Reference issue

* Update issue URL
This commit is contained in:
Amadeus 2020-05-29 19:14:45 +01:00 committed by GitHub
parent 0d43338a37
commit 27ef03fc05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 4 deletions

View File

@ -168,3 +168,15 @@ This script is also used to manage uncommon options that are currently not
available in the IDE menu.
`Read more <a05-board-generator.rst>`__.
My WiFi won't reconnect after deep sleep using ``WAKE_RF_DISABLED``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When you implement deep sleep using ``WAKE_RF_DISABLED``, this forces what
appears to be a bare metal disabling of WiFi functionality, which is not
restored using ``WiFi.forceSleepWake()`` or ``WiFi.mode(WIFI_STA)``. If you need
to implement deep sleep with ``WAKE_RF_DISABLED`` and later connect to WiFi, you
will need to implement an additional (short) deep sleep using
``WAKE_RF_DEFAULT``.
Ref. `#3072 <https://github.com/esp8266/Arduino/issues/3072>`__

View File

@ -73,7 +73,7 @@ ESP-specific APIs
Some ESP-specific APIs related to deep sleep, RTC and flash memories are available in the ``ESP`` object.
``ESP.deepSleep(microseconds, mode)`` will put the chip into deep sleep. ``mode`` is one of ``WAKE_RF_DEFAULT``, ``WAKE_RFCAL``, ``WAKE_NO_RFCAL``, ``WAKE_RF_DISABLED``. (GPIO16 needs to be tied to RST to wake from deepSleep.) The chip can sleep for at most ``ESP.deepSleepMax()`` microseconds.
``ESP.deepSleep(microseconds, mode)`` will put the chip into deep sleep. ``mode`` is one of ``WAKE_RF_DEFAULT``, ``WAKE_RFCAL``, ``WAKE_NO_RFCAL``, ``WAKE_RF_DISABLED``. (GPIO16 needs to be tied to RST to wake from deepSleep.) The chip can sleep for at most ``ESP.deepSleepMax()`` microseconds. If you implement deep sleep with ``WAKE_RF_DISABLED`` and require WiFi functionality on wake up, you will need to implement an additional ``WAKE_RF_DEFAULT`` before WiFi functionality is available.
``ESP.deepSleepInstant(microseconds, mode)`` works similarly to ``ESP.deepSleep`` but sleeps instantly without waiting for WiFi to shutdown.