Skip to content
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

Cannot wakeup from deep sleep with WAKE button #11

Open
MitchBradley opened this issue Jan 10, 2024 · 11 comments
Open

Cannot wakeup from deep sleep with WAKE button #11

MitchBradley opened this issue Jan 10, 2024 · 11 comments

Comments

@MitchBradley
Copy link

The documentation and schematics say that GPIO 42 - the dial switch - is for WAKE. When I put the ESP32-S3 into deep sleep mode, I cannot get it to wake up by pressing the dial switch.

The Espressif documents say that only RTC GPIOs can be used for wakeup from deep sleep. According to the ESP32-S3 datasheet at https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf , only GPIOS 0-21 are RTC GPIOs.

Is there any way to wake from deep sleep with a button press on the M5 Dial?

@felmue
Copy link

felmue commented Jan 11, 2024

Hello @MitchBradley

the dial switch cannot be used to wakeup ESP32 from light or deep sleep, for the reason you already mentioned above - GPIO42 is not an RTC GPIO.

Edit: I just found out that the dial switch can be used to wakeup ESP32 from light sleep using GPIO Wakeup. See here.

What the dial switch can do is wake the system from a full shutdown state.

Thanks
Felix

@MitchBradley
Copy link
Author

What do you mean by full shutdown? How does one enter "full shutdown" ?

@felmue
Copy link

felmue commented Jan 11, 2024

Hello @MitchBradley

please have a look at the wakeup example here.

Below line (commented out in the example) does a full shutdown.

M5Dial.Power.powerOff();

Note: in full shutdown state only the RTC IC (RTC8563) is still powered which can also be used to wake up after some time.

Thanks
Felix

@jsgagnon2020
Copy link

Hello,
Based on the previous comment and my tests,
it is possible to go in "sleep mode" /or/ "shutdown mode" by coding uniquely. (the example does that)

But
Is it possible to get out of these two modes uniquely base on the "rotating knob" /or/ "push button" /or/ "touch screen" ?

Meaning: Waking up from sleep or shutdown the M5Dial uniquely with the "rotating knob" /or/ "push button" /or/ "touch screen" ?
att.: Uniquely and NOT through a pin state?

Thank, JS

@felmue
Copy link

felmue commented Feb 8, 2024

Hello @jsgagnon2020

A: Getting out of shutdown mode is only possible via "push button" (WAKE) or RTC (INT) which are connected to the wake-up circuit. See schematic here. ("rotating knob" and "touch screen" are not connected to the wake-up circuit.)

B: Getting out of sleep mode is only possible via "touch screen" (TP_INT) which uses an RTC GPIO. ("rotating knob" and "push button" cannot be used to wake from deep sleep as they are connected to non RTC GPIOs.)

Edit: "rotating knob" and "push button" can be used to wake up from light sleep using GPIO Wakeup. See here.

You can use the wake-up cause to figure out what has woken up the system. See here.

For A: the wake-up cause should be ESP_SLEEP_WAKEUP_UNDEFINED.

For B: the wake-up cause should be not ESP_SLEEP_WAKEUP_UNDEFINED.

Note: above info is based on reading schematic and documents only - not tested with hardware - so I could be wrong.

Thanks
Felix

@jsgagnon2020
Copy link

:) :) most appreciated, when I will have the Arduino code for the M5Dial, I will share it

@felmue
Copy link

felmue commented Feb 9, 2024

Hello @jsgagnon2020

I've created a simple example show-casting sleep modes and waking from touch screen or dial button.

Thanks
Felix

@jsgagnon2020
Copy link

jsgagnon2020 commented Feb 9, 2024 via email

@jsgagnon2020
Copy link

jsgagnon2020 commented Feb 9, 2024 via email

@jsgagnon2020
Copy link

After more testing,

I found out that if you plug a battery in the M5Dial, the touchPad AND the button** work for the deepsleep
(button** ONLY if the M5Dial as a battery as a power source)

Thank to all

@jsgagnon2020
Copy link

jsgagnon2020 commented Feb 10, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants