EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1049 background imageLoading...
Page #1049 background image
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. These sources can be
combined, in this case the chip will wake up when any one of the sources is triggered. Wakeup
sources can be enabled using esp_sleep_enable_X_wakeup APIs and can be disabled using
esp_sleep_disable_wakeup_source() API. Next section describes these APIs in detail. Wakeup
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() API.
Once wakeup sources are configured, application can enter sleep mode using esp_light_sleep_start() or
esp_deep_sleep_start() APIs. At this point the hardware will be configured according to the requested
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 doesnt require RTC peripherals or RTC memories to be powered on during sleep.
esp_sleep_enable_timer_wakeup() function can be used to enable deep sleep wakeup using a timer.
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() function can be used to enable this wakeup source.
Espressif Systems 1038
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish