Page 1 of 1

How did I get this wakeup cause?

Posted: Fri Jul 31, 2026 5:45 am
by JolonBMT
My ESP32-S3 woke up from deepsleep with the following wake cause (see the end of the log):

Code: Select all

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x5 (DSLEEP),boot:0xa (SPI_FAST_FLASH_BOOT)
pro cpu reset by JTAG
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2820,len:0x159c
load:0x403c8700,len:0xd24
load:0x403cb700,len:0x2fa0
entry 0x403c8924
I (26) boot: ESP-IDF v5.5 2nd stage bootloader
I (26) boot: compile time Jul 31 2026 11:41:32
I (27) boot: Multicore bootloader
I (27) boot: chip revision: v0.2
I (29) boot: efuse block revision: v1.4
I (33) boot.esp32s3: Boot SPI Speed : 80MHz
I (37) boot.esp32s3: SPI Mode       : DIO
I (41) boot.esp32s3: SPI Flash Size : 4MB
I (44) boot: Enabling RNG early entropy source...
I (49) boot: Partition Table:
I (51) boot: ## Label            Usage          Type ST Offset   Length
I (58) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (64) boot:  1 otadata          OTA data         01 00 0000f000 00002000
I (71) boot:  2 phy_init         RF data          01 01 00011000 00001000
I (77) boot:  3 ota_0            OTA app          00 10 00020000 001a9000
I (84) boot:  4 ota_1            OTA app          00 11 001d0000 001a9000
I (90) boot: End of partition table
I (94) esp_image: segment 0: paddr=00020020 vaddr=3c090020 size=21358h (136024) map
I (125) esp_image: segment 1: paddr=00041380 vaddr=3fc9ac00 size=04788h ( 18312) load
I (129) esp_image: segment 2: paddr=00045b10 vaddr=40374000 size=0a508h ( 42248) load
I (139) esp_image: segment 3: paddr=00050020 vaddr=42000020 size=82460h (533600) map
I (233) esp_image: segment 4: paddr=000d2488 vaddr=4037e508 size=0c6c8h ( 50888) load
I (244) esp_image: segment 5: paddr=000deb58 vaddr=600fe000 size=00080h (   128)
I (259) boot: Loaded app from partition at offset 0x20000
I (259) boot: Disabling RNG early entropy source...
I (269) cpu_start: Multicore app
I (278) cpu_start: Pro cpu start user code
I (278) cpu_start: cpu freq: 160000000 Hz
I (278) app_init: Application information:
I (278) app_init: Project name:     Milkhub-Wireless-Keypad
I (283) app_init: App version:      7007a39-dirty
I (287) app_init: Compile time:     Jul 31 2026 12:28:24
I (293) app_init: ELF file SHA256:  7d3508860...
I (297) app_init: ESP-IDF:          v5.5
I (300) efuse_init: Min chip rev:     v0.0
I (304) efuse_init: Max chip rev:     v0.99
I (308) efuse_init: Chip rev:         v0.2
I (312) heap_init: Initializing. RAM available for dynamic allocation:
I (318) heap_init: At 3FCA3578 len 00046198 (280 KiB): RAM
I (324) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (329) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (334) heap_init: At 600FE080 len 00001F68 (7 KiB): RTCRAM
I (340) spi_flash: detected chip: gd
I (343) spi_flash: flash io: dio
I (346) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (352) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (359) main_task: Started on CPU0
I (369) main_task: Calling app_main()
I (369) msg_router: Version 0.1-1
I (369) msg_router: Wake cause: 7
This is my code:

Code: Select all

void app_main(void)
{
    ESP_LOGI(TAG, "Version %d.%d-%d", SW_VER_MAJOR, SW_VER_MINOR, SW_VER_REV);
    ESP_LOGI(TAG, "Wake cause: %d", esp_sleep_get_wakeup_cause());
How is this possible when wakeup cause 7 (ESP_SLEEP_WAKEUP_GPIO) is described as only being relevant to light sleep on the ESP32-S3 (in ESP-IDF v5.5.0)?

Code: Select all

    ESP_SLEEP_WAKEUP_GPIO,         //!< Wakeup caused by GPIO (light sleep only on ESP32, S2 and S3)
I do have EXT1 wakeup pins configured, but these typically cause ESP_SLEEP_WAKEUP_EXT1 instead.

Re: How did I get this wakeup cause?

Posted: Sun Aug 09, 2026 5:32 am
by mikemoy
Ran your question and output to AI. Came back with this.

In the ESP-IDF framework, wake causes are defined by the esp_sleep_wakeup_cause_t (or esp_sleep_source_t) enumeration.
A wake cause value of 7 corresponds to ESP_SLEEP_WAKEUP_GPIO.
What this means:Wake Source: The ESP32-S3 woke up because of a GPIO pin level change.Details: This typically means you configured a digital GPIO pin (using the deeper sleep GPIO wakeup capabilities available on chips like the ESP32-S3) to trigger a wakeup when its state changed.

You can identify the specific pin that triggered the wakeup by calling:C
uint64_t pin_mask = esp_sleep_get_gpio_wakeup_status();