Closed pguyot closed 1 year ago
Thank you for your report...! I will check and adjust.
Hi this may be related, also on CoreInk, when I use:
M5.Power.deepSleep(10 * 1000000);
it works correctly on USB power, that is, wakes up after 10 seconds. On battery, it goes to sleep but never wakes up. A single push of the power button wakes it up again.
Hi guys, I found a solution here https://github.com/m5stack/M5Core-Ink/issues/8
Although note that it does keep the port power on so your external sensors will not power down.
thankyou @lovyan03 👍
I was a bit mistaken. It seems @pguyot 's first post contains a misunderstanding of the spec.
The timerSleep is intended to be started using the I2C RTC timer, not a function intended to make it deepSleep.
If you want ESP32 to do deepSleep, use M5.Power.deepSleep
.
Although the designation of deepSleep is not originally necessary in the timerSleep function, it is included as a fallback action because the ESP32 will not be able to return from timerSleep on models that do not have an RTC.
Using tag 0.1.6.
Calling
M5.Power.timerSleep(int)
puts a CoreInk to deep sleep, but when it wakes up, if it is running on battery, the reboot reason (result ofesp_reset_reason()
) is notESP_RST_DEEPSLEEP
butESP_RST_WDT
orESP_RST_POWERON
and any RTC Slow memory variable (RTC_NOINIT_ATTR
) is lost.The problem doesn't happen if the CoreInk is plugged on USB. The problem doesn't happen if the following two lines are commented:
Also, I haven't been able to get
M5.Power.timerSleep(const rtc_time_t&)
on the CoreInk to work at all.