Page 1 of 1

GPIO17 do not turn tpo LOW

Posted: Sun Dec 10, 2023 7:51 pm
by ogedik
Hi,

I am developing a circuit based on ESPC3-13 module. I faced with a problem in deep sleep task. The problem that I faced; GPIO17 never turn to LOW state after I set it to HIGH at deep sleep mode. But if I set GPIO17 LOW at the beginning and do not set state to HIGH, pin goes LOW without any problem at deep sleep. What may cause this problem? Or how can I solve it? Please find the problematic code below;

Code: Select all

#include "driver/gpio.h"

#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 60       /* Time ESP32 will go to sleep (in seconds) */
#define INTERRUPT_PIN 3
#define SENSOR_POWER 1

void setup() {
  Serial.begin(115200);

  pinMode(SENSOR_POWER, OUTPUT);
  digitalWrite(SENSOR_POWER, HIGH);
  
  delay(3000);
  
  digitalWrite(SENSOR_POWER, LOW);

  esp_deep_sleep_enable_gpio_wakeup(1 << INTERRUPT_PIN, ESP_GPIO_WAKEUP_GPIO_LOW);
  esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);

  esp_deep_sleep_start();
}

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

Orkun Gedik

Re: GPIO17 do not turn tpo LOW

Posted: Mon Dec 11, 2023 3:52 pm
by lbernstone