ESP32 External Wake from Sleep Not Working
DodaTech
Updated 2026-06-26
1 min read
In this tutorial, you'll learn about ESP32 External Wake from Sleep Not Working. We cover key concepts, practical examples, and best practices.
The Problem
ESP32 does not wake from deep or light sleep when an external GPIO signal is applied.
Quick Fix
Wrong
esp_sleep_enable_ext0_wakeup(GPIO_NUM_5, 1); // GPIO 5 is not RTC
ESP_ERR_INVALID_ARG: GPIO is not an RTC GPIO. Device does not wake.
Right
// RTC GPIOs: 0,2,4,12-15,25-27,32-39
esp_sleep_enable_ext0_wakeup(GPIO_NUM_33, 1); // Wake on HIGH
// OR use ext1 for multiple pins:
uint64_t mask = (1ULL << GPIO_NUM_33) | (1ULL << GPIO_NUM_32);
esp_sleep_enable_ext1_wakeup(mask, ESP_EXT1_WAKEUP_ANY_HIGH);
ESP32 wakes from deep sleep when GPIO 33 goes HIGH.
Prevention
Only RTC-capable GPIOs work for wake from deep sleep. Ext0 wakes on one pin (level-sensitive). Ext1 wakes on any of multiple pins. Debounce wake signals externally. Check wake cause with esp_sleep_get_wakeup_cause().
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