Q: How to put the chip into sleep mode? and what conditions do we need?ESP8266 supports three sleep modes, i.e., Modem-sleep, Light-sleep and Deep-sleep. For Modem-sleep and Light-sleep, ESP8266 must meet the following requirements:

ESP8266 is set to Station_only mode.

ESP8266 links to Router to obtain IP address.

The system is in idle state.

[Function Callback]

Call the function of wifi_set_sleep_type and set ESP8266 to Modem-sleep or Light-sleep.

Call the function of system_deep_sleep and set ESP8266 to Deep-sleep mode.

Light-sleep mode can be used to maintain the link between ESP8266 and Router. This mode enable ESP8266 to give a real-time response to data sent by Router. CPU can be idle state before it receives commands. For example, in Wi-Fi switches, CPU is in idle state until it receives the control command and begins to operate GPIO.

Deep-sleep mode can be used in low power generation sensors or in the context in which data transmission is not needed in part of the execution time. Devices can wake up to measure data and update them in a periodic way and then re-enter the Deep-sleep mode. Data could also be stored in RTC memory (this applies in Deep-sleep mode) and be sent out all at once.

[Notes]

Your program cannot have a round robin timer in the program, or its CPU will fail to enter the sleep mode.

It is only required in the Deep-sleep mode that XPD_DCDC(GPIO16) or GPIO in the MCU should be connected to EXT_RSTB to wake up the chip. There are no special requirements in the other modes.

Documentation

About Us

Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.