Multiple Wake UP source esp32

Hallo versuche meinen esp32 entweder per timer oder external interrupt zu wekchen, aber er wird nicht wieder geweckt? WO ist mein Fehler?
Hier mein code

RTC_DATA_ATTR int bootCount = 0;

/*
Method to print 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 ESP_SLEEP_WAKEUP_EXT0 : Serial.println("Wakeup caused by external signal using RTC_IO"); break;
    case ESP_SLEEP_WAKEUP_EXT1 : Serial.println("Wakeup caused by external signal using RTC_CNTL"); break;
    case ESP_SLEEP_WAKEUP_TIMER : Serial.println("Wakeup caused by timer"); break;
    case ESP_SLEEP_WAKEUP_TOUCHPAD : Serial.println("Wakeup caused by touchpad"); break;
    case ESP_SLEEP_WAKEUP_ULP : Serial.println("Wakeup caused by ULP program"); break;
    default : Serial.printf("Wakeup was not caused by deep sleep: %d\n",wakeup_reason); break;
  }
}

void setup(){
  Serial.begin(115200);
  delay(1000); //Take some time to open up the Serial Monitor

  //Increment boot number and print it every reboot
  ++bootCount;
  Serial.println("Boot number: " + String(bootCount));

  //Print the wakeup reason for ESP32
  print_wakeup_reason();

  
  esp_sleep_enable_ext0_wakeup(GPIO_NUM_25,1); //1 = High, 0 = Low

  
  //Go to sleep now
  Serial.println("Going to sleep now");
esp_sleep_enable_timer_wakeup(20 * 1000000ULL);
  esp_deep_sleep_start();
  Serial.println("This will never be printed");
}

void loop(){
  //This is not going to be called
}

ich verwende ein fire beetle board

Ich habe eine Zeile ergänzt, weil ich es mit einem Kabel teste:

  pinMode(GPIO_NUM_25, INPUT_PULLDOWN);
  esp_sleep_enable_ext0_wakeup(GPIO_NUM_25, HIGH);
serieller Monitor
Boot number: 1
Wakeup was not caused by deep sleep: 0
Going to sleep now
ets Jun  8 2016 00:22:57

rst:0x5 (DEEPSLEEP_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13836
load:0x40080400,len:3608
entry 0x400805f0
Boot number: 2
Wakeup caused by timer
Going to sleep now
ets Jun  8 2016 00:22:57

rst:0x5 (DEEPSLEEP_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13836
load:0x40080400,len:3608
entry 0x400805f0
Boot number: 3
Wakeup caused by external signal using RTC_IO
Going to sleep now
ets Jun  8 2016 00:22:57

rst:0x5 (DEEPSLEEP_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13836
load:0x40080400,len:3608
entry 0x400805f0
Boot number: 4
Wakeup caused by timer
Going to sleep now

Ich verwende ESP32 Dev Module; Chip is ESP32-D0WDQ6 (revision 1).

D.h. Kabel gegen masse?

Nö, der interne PullDown-Widerstand zieht den Eingang gegen GND, mit dem Kabel tippe ich an 3,3 V, um den Interrupt auszulösen.

Ohne widerstand?

Ja. Der interne PullDown-Widerstand hat ca. 50 kΩ, da fließt nur wenig Strom.

Aber fire beetle board kenne ich nicht!

Ist normaler ESP32 + CH340 mit 36 Pins, nur hergestellt für Dfrobot :wink:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.