I'm trying to wake up my ESP-32 WROVER-E from an external source using the esp_sleep_enable_ext0_wakeup() function:
Code: Select all
void go_to_sleep(uint32_t useconds)
{
esp_wifi_stop();
esp_sleep_enable_ext0_wakeup(GPIO_NUM_4, 0);
esp_deep_sleep(useconds);
}
I tried the power domain function, the pull ups and down and nothing worked.
If I comment the wakeup source line the device go to sleep the time setted, and the GPIO 4 stays "high" for the whole sleeping period.
esp_sleep_get_wakeup_cause() returns ESP_SLEEP_WAKEUP_EXT0 and GPIO_NUM_4 is the only setted wake up source.
Did I missed something? Any idea?
Regards,
P
PS:
1) I run 'rtc_deinit' the GPIO pin when device wakes up.
2) I'm using ESP-IDF 4.4.5
3) Chip is ESP32-D0WD-V3 (revision v3.0)