For the ESP8266 see here.
Both ESP-IDF and the Arduino core are still very unstable, again (as with the ESP8266) with the Arduino core being seemingly more mature. (
Wire.begin() worked out of the box while I couldn’t get
i2c_master_cmd_begin() to work properly.) This is especially true for the power management functions, so…
Deep sleep. Easy and flawless. That includes waking up by timer, by GPIO, touch controller and co., ultra-low-power coprocessor programs and wakeup stubs.
What doesn’t work?
Everything else. Modem sleep and light sleep allegedly exist and are supposed to be partially controlled by the RTOS, but in reality the power usage is as shown in the following image and I didn’t find any code that would be able to make any difference:
Note that compared to the ESP8266 the Wifi hardware stays switched off until needed (good!), but pulse current and idle power is higher. This is probably because the CPU frequency is higher. The CPU frequency can be selected but it’s complicated (there’s no runtime API call, the firmware needs to be rebuilt) and completely unsupported in the Arduino core.
2 Replies to “The sleep states of the ESP32”
Woah! I’m really loving the template/theme of this blog. It’s simple, yet effective. can i share it?
how it can be selected?