ESP32-s3 won't wake from sleep

I have an Adafruit QT Py esp32-s3. Works fine except when I try to put it into either light sleep or deep sleep. It goes to sleep and does not wake up.

Code is the standard ESP-32 Sleep timer example. Nothing fancy. V2.1.1 of the IDE on Windows 11.

Has anyone had success using sleep functions on the S3? It seems to be a different beast.

Thanks!

I did some more search and managed to find a solution, although I can't explain why. Posting here in case someone else has the same issue.

I found a stripped down example and added the Neopixel blinks to watch it wake up and count the reboots.

Be aware that when my serial monitor lost the connection and I reconnected, it effectively reset the board and started the boot count over.

Based on this site: ESP32 Deep Sleep Tutorial - educ8s.tv - Watch Learn Build

This is customized for the QT Py ESP32-S3

//Deep Sleep Test

#define uS_TO_S_FACTOR 1000000  /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP  5        /* Time ESP32 will go to sleep (in seconds) */

RTC_DATA_ATTR int bootCount = 0;

#include <Adafruit_NeoPixel.h>

// How many internal neopixels do we have? some boards have more than one!
#define NUMPIXELS 1
Adafruit_NeoPixel pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);

void setup(){
  Serial.begin(115200);
  delay(1000); //Take some time to open up the Serial Monitor
    pinMode(NEOPIXEL_POWER, OUTPUT);
  digitalWrite(NEOPIXEL_POWER, HIGH);
  pixels.begin();            // INITIALIZE NeoPixel strip object (REQUIRED)
  pixels.setBrightness(30);  // not so bright
  ESP_NP_Blink(0x00FF00, 5);  //Blink green 5 times to tell me you're awake
  delay(2000);
  bootCount = bootCount+1;
  Serial.println("Boot number: " + String(bootCount));
  ESP_NP_Blink(0x0000FF, bootCount);  //Blink blue bootcount times to see how many cycles

  esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
  Serial.println("Going to sleep...");
  delay(2000);
  esp_deep_sleep_start();
}

void loop(){
  
}


void ESP_NP_Blink(uint32_t color, int blinkNum) {
  for (int i = 0; i < blinkNum; i++) {
    // set color to selected
    pixels.fill(color);
    pixels.show();
    delay(200);  // wait half a second

    // turn off
    pixels.fill(0x000000);
    pixels.show();
    delay(100);  // wait 1/10 a second
  }
}

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