hello,
i have strange behavior on my esp32 wroom dev ket 1 in deep sleep mode.
when i enable external wakeup source to be used as interrupt for deep sleep it wakes up unexpectedly and usually waking up all the time (every second).
when i use the same wiring but with regular interrupt it works as expected.
RTC_DATA_ATTR int bootCount = 0;
void setup(){
Serial.begin(115200);
delay(1000);
//Increment boot number and print it every reboot
++bootCount;
Serial.println("Boot number: " + String(bootCount));
//Print the wakeup reason for ESP32
print_wakeup_reason();
//Configure GPIO25 as ext0 wake up source for HIGH logic level
esp_sleep_enable_ext0_wakeup(GPIO_NUM_25,1);
//Go to sleep now
esp_deep_sleep_start();
}
void loop(){}
//Function that prints the reason by which ESP32 has been awaken from sleep
void print_wakeup_reason(){
esp_sleep_wakeup_cause_t wakeup_reason;
wakeup_reason = esp_sleep_get_wakeup_cause();
switch(wakeup_reason)
{
case 1 : Serial.println("Wakeup caused by external signal using RTC_IO"); break;
case 2 : Serial.println("Wakeup caused by external signal using RTC_CNTL"); break;
case 3 : Serial.println("Wakeup caused by timer"); break;
case 4 : Serial.println("Wakeup caused by touchpad"); break;
case 5 : Serial.println("Wakeup caused by ULP program"); break;
default : Serial.println("Wakeup was not caused by deep sleep"); break;
}
}