ESP32 Light Sleep Wakes Immediately
DodaTech
Updated 2026-06-26
1 min read
In this tutorial, you'll learn about ESP32 Light Sleep Wakes Immediately. We cover key concepts, practical examples, and best practices.
The Problem
ESP32 enters light sleep but wakes up immediately or never enters sleep.
Quick Fix
Wrong
esp_light_sleep_start(); // Interrupts cause immediate wake
Light sleep lasts <1ms. CPU stays at high power.
Right
esp_sleep_enable_timer_wakeup(5 * 1000000); // 5 seconds
esp_light_sleep_start();
uint64_t sleepTime = esp_sleep_get_wakeup_time();
Serial.printf("Slept for %llu us\n", sleepTime);
Slept for 5000000 us
(5 seconds of light sleep at 0.5mA)
Prevention
Disable WiFi/BT before light sleep (esp_bluedroid_disable(), esp_wifi_stop()). Configure wake sources properly. Mask unwanted wake-up interrupts. Use esp_sleep_enable_gpio_wakeup() for GPIO wake. Light sleep keeps RAM powered (0.5mA).
DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.
FAQ
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro