Sleep Modes - Espressif ESP32-S2 Programming Manual

Table of Contents

Advertisement

Chapter 2. API Reference

2.6.23 Sleep Modes

Overview
ESP32-S2 is capable of light sleep and deep sleep power saving modes.
In light sleep mode, digital peripherals, most of the RAM, and CPUs are clock-gated, and supply voltage is reduced.
Upon exit from light sleep, peripherals and CPUs resume operation, their internal state is preserved.
In deep sleep mode, CPUs, most of the RAM, and all the digital peripherals which are clocked from APB_CLK are
powered off. The only parts of the chip which can still be powered on are:
• RTC controller
• RTC peripherals
• ULP coprocessor
• RTC fast memory
• RTC slow memory
Wakeup from deep and light sleep modes can be done using several sources.
combined, in this case the chip will wake up when any one of the sources is triggered.
sources can be enabled using esp_sleep_enable_X_wakeup APIs and can be disabled using
esp_sleep_disable_wakeup_source()
sources can be configured at any moment before entering light or deep sleep mode.
Additionally, the application can force specific powerdown modes for the RTC peripherals and RTC memories using
esp_sleep_pd_config()
Once wakeup sources are configured, application can enter sleep mode using
esp_deep_sleep_start()
wakeup sources, and RTC controller will either power down or power off the CPUs and digital peripherals.
If WiFi connection needs to be maintained, enable WiFi modem sleep, and enable automatic light sleep feature (see
Power Management
APIs). This will allow the system to wake up from sleep automatically when required by WiFi
driver, thereby maintaining connection to the AP.
WiFi and sleep modes
In deep sleep and light sleep modes, wireless peripherals are powered down. Before entering deep sleep or light sleep
modes, applications must disable WiFi using appropriate calls (esp_wifi_stop()). WiFi connection will not be
maintained in deep sleep or light sleep, even if these functions are not called.
Wakeup sources
Timer
RTC controller has a built in timer which can be used to wake up the chip after a predefined amount of
time. Time is specified at microsecond precision, but the actual resolution depends on the clock source selected for
RTC SLOW_CLK.
For details on RTC clock options, see ESP32-S2 Technical Reference Manual > ULP Coprocessor [PDF].
This wakeup mode doesn't require RTC peripherals or RTC memories to be powered on during sleep.
esp_sleep_enable_timer_wakeup()
Touch pad
RTC IO module contains logic to trigger wakeup when a touch sensor interrupt occurs. You need to
configure the touch pad interrupt before the chip starts deep sleep.
esp_sleep_enable_touchpad_wakeup()
Espressif Systems
API. Next section describes these APIs in detail. Wakeup
API.
APIs. At this point the hardware will be configured according to the requested
function can be used to enable deep sleep wakeup using a timer.
function can be used to enable this wakeup source.
1038
Submit Document Feedback
These sources can be
esp_light_sleep_start()
Release v4.4
Wakeup
or

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Table of Contents

Save PDF