I have tried to run the default example of deep sleep using GPIO wakeup mode in ESP8684-WROOM-05. In that case i have enabled GPIO wakeup in menuconfig and set the default wakeup pin and mode.
My device is entering in deep sleep mode when i give interrupt using GPIO pin + GND and going to wakeup state when i give interrupt to pin +3v3(VCC). But after wakeup mode board is continuously getting booted unit i keep pin to VCC. Why this happen? I think the behavior of GPIO_PIN +GND is working properly and same should happen with GPIO_PIN + VCC. Board should get rebooted only once when it switches from deep sleep to wakeup. Here are my logs for reference.
Wakeup from deep sleep mode using GPIO interrupt is rebooting the device
-
- Posts: 3
- Joined: Wed Jul 10, 2024 10:59 am
Wakeup from deep sleep mode using GPIO interrupt is rebooting the device
- Attachments
-
- gpio_wakeup_issue_in_deep_sleep_mode.txt
- (22.49 KiB) Downloaded 61 times
-
- Posts: 9709
- Joined: Thu Nov 26, 2015 4:08 am
Re: Wakeup from deep sleep mode using GPIO interrupt is rebooting the device
You mean this example? That's expected behaviour. The main firmware goes immediately into deep sleep mode and the CPU will get woken up when (depending on configuration) the selected GPIO has a high level. Note: not when it goes from a low to a high level; simply being at a high level is enough. That means that the firmware will wake up and go to sleep continuously when you apply a high level. If this is not what you want, I'd suggest adding code in the firmware that waits until the GPIO is low again before going into deep sleep.
-
- Posts: 3
- Joined: Wed Jul 10, 2024 10:59 am
Re: Wakeup from deep sleep mode using GPIO interrupt is rebooting the device
Hi,ESP_Sprite wrote: ↑Thu Jul 11, 2024 3:31 amYou mean this example? That's expected behaviour. The main firmware goes immediately into deep sleep mode and the CPU will get woken up when (depending on configuration) the selected GPIO has a high level. Note: not when it goes from a low to a high level; simply being at a high level is enough. That means that the firmware will wake up and go to sleep continuously when you apply a high level. If this is not what you want, I'd suggest adding code in the firmware that waits until the GPIO is low again before going into deep sleep.
Thanks for reply. My query is like when i use HIGH_LEVEL_WAKEUP (means vcc= wakeup) and pin is continuous high the board is continuously getting wakeup event and due to that it is getting rebooted. I want to avoid those functionality. I want behavior is like when pin is high(continuously-connected to vcc) at that time only once the wakeup will call and when it goes again low deep sleep get start. I am using ESP32C2 board. Please guide me how can i implement these functionality?
-
- Posts: 9709
- Joined: Thu Nov 26, 2015 4:08 am
Re: Wakeup from deep sleep mode using GPIO interrupt is rebooting the device
Then after a wake-up you need to wait until that GPIO goes low again. You can either stay awake until that happens, or you can go to sleep and set the wakeup source to wake you up when that GPIO is low; when you wake up you can reset it to wake you when the GPIO is high and go to sleep again.
Who is online
Users browsing this forum: No registered users and 282 guests