Page 1 of 1

Problems with waking up from deepsleep ESP32C3

Posted: Thu Mar 21, 2024 10:28 am
by lololatte
Hello,

I'm in need of some assistance to identify errors in my project. I've designed a custom circuit using an ESP32C3 and am encountering issues with waking the board from deep sleep mode.

Current Situation:
A function is set to transition the ESP into deep sleep after a specific duration. Here's the code snippet for entering deep sleep:

Code: Select all

static void sleep_timer_callback(TimerHandle_t xTimer) {
    esp_deep_sleep_enable_gpio_wakeup(BIT(GPIO_INPUT_IO_RIGHT), ESP_GPIO_WAKEUP_GPIO_HIGH);
    esp_deep_sleep_start();
}
However, I've noticed inconsistent behavior with the GPIO wakeup button. Sometimes it successfully wakes the board, and other times, it doesn't respond. Interestingly, when the UART (used as a programming interface) and power are connected, the wakeup function seems to operate correctly. Yet, when relying solely on battery power, the wakeup function becomes unreliable. Normally, the GPIO buttons are configured to trigger interrupt functions in the operational mode.

Circuit Details:
My circuit incorporates an AP9211 Battery Protection circuit and a XC6210B332MR LDO. Here are the schematics:
schematic_power.PNG
schematic_power.PNG (32.38 KiB) Viewed 782 times
schematic_mcu.PNG
schematic_mcu.PNG (15.26 KiB) Viewed 782 times

I would deeply appreciate any suggestions or guidance that could point me in the right direction. Despite thorough searches across various forums, I haven't found any solutions that address my issue.

Thank you very much for your time and assistance.

Best regards

Re: Problems with waking up from deepsleep ESP32C3

Posted: Thu Mar 21, 2024 2:35 pm
by liaifat85
I think you need to modify your code for waking up the ESP32C3 from deep sleep while being powered by an external source. Here are some threads that discuss the same issue with ESP32C3.
https://forum.seeedstudio.com/t/esp32c3 ... e/269513/6
https://forum.micropython.org/viewtopic.php?t=10884