GPIO17 do not turn tpo LOW

ogedik
Posts: 35
Joined: Wed Jun 28, 2023 8:32 pm

GPIO17 do not turn tpo LOW

Postby ogedik » Sun Dec 10, 2023 7:51 pm

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


Who is online

Users browsing this forum: Baidu [Spider] and 94 guests