-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32S3: ESP-IDF light_sleep and deep_sleep examples bundled to IDF do not work (IDFGH-7286) #8875
Comments
Interestingly enough if i delete most conditional parts of the bundled examples until only these lines remain, then the ESP32S3 board behaves as expected and also the amp meter shows low consumption:
|
Hmmm... after flashing the above modified code once and reverting back to the original examples, also the original examplex work now on the ESP32S3 board. This really puzzles me 🤔 |
@idea--list did you manage to reproduce the issue again? Have tried the examples on an ESP32-S3 devkit, and both seem to be working... Note that the ESP32-S3 DevKit-C board also has a CP2102 chip and an addressable LED. Both will continue to consume current when ESP32-S3 goes into deep sleep. It is better to use an ESP32-S3 module (instead of a devkit) to evaluate current consumption in deep sleep. |
Hi @idea--list, did you reproduce the issue again? |
@igrr When running the light sleep example on my ESP32S3 board i need to change BUTTON_GPIO_NUM_DEFAULT to let's say 12, but even after doing so, the power consumption drops to the expected level only while that pin is pulled up by connecting to the 3V3 pin. As soon as i disconnect pin 12 from 3V3, the power consumption increases to about 34mA without waiting until the sleep times out as set in line 50 of the example. Do not know if this might be related somehow with espressif/arduino-esp32#6612, but it seems to me the light sleep example might need some revision. |
@idea--list I think the wakeup GPIO should indeed be pulled up externally, so that it doesn't float while the chip is in sleep mode and doesn't cause accidental wakeup. For the default GPIO 0 (which is usually connected to "Boot" button on ESP boards), this is already the case. However there might be no pullup resistor on GPIO12 on your development board. |
@igrr I am not sure if my finding would be related to a possible floating of pin 12. As if that would be the case, i guess my board would output "Entering light sleep" at random intervals. However my observation is that after seeing the terminal output "Waiting for GPIO 12 to go high..." i can wait however long i wish before pulling that pin up that leads to "Entering light sleep" output, where i lose any further output because of espressif/arduino-esp32#6612. I guess if this was a floating pin issue, my observation would be something else. |
Sorry that I wasn't clear. By "floating" I meant "high-impedance input not driven to any specific logic level". Maybe there is some very week pulldown on the pin which makes it default to low state. Because the pin reads back as "low", the example doesn't enter sleep until it sees high logic level on the pin. Connecting the pin to 3.3V makes the example proceed and enter the sleep mode.
Yes, I think that's one of the limitations of the built-in USB_SERIAL_JTAG peripheral, that it is suspended during light sleep, and USB connectivity gets broken. The root cause of this issue is #8507 — it will need to be fixed in IDF first and then the fix should be pulled into Arduino. In the meantime, please try using UART as console output when developing sleep related features. |
@idea--list @RS2021baseapp did you reproduce this issue again? |
Thanks for reporting, will close due to short of feedback, feel free to reopen with more updates. Thanks. |
Environment
Development Kit: Adafruit ESP32S3 Feather
IDF version: V4.4.1
Build System: idf.py
Compiler version: xtensa-esp32-elf-gcc V8.4.0
Operating System: Windows 10 x64
(Windows only) environment type: ESP Command Prompt
Power Supply: USB
Problem Description
On Adafruit ESP32S3 Feather board light_sleep and deep_sleep examples bundled to ESP-IDF compile, flash, but do not work as expected. Power consumption remains high and constant.
On an old ESP32 board both examples work as expected.
Interestingly using Arduino IDE V1.8.19, esp32 core V2.0.3-RC1, esp_sleep_enable_timer_wakeup() and esp_light_sleep_start() or esp_deep_sleep_start() i can reach the expected power consumptions even on the Adafruit ESP32S3 Feather board
Expected Behavior
Low power consumptions with ESP-IDF on the new ESP32S3 chip
Actual Behavior
My ESP32S3 board does not seem to enter ligt or deep sleep states
Steps to reproduce
The text was updated successfully, but these errors were encountered: