Customer:
I’m experiencing a bug with deep sleep that I previously reported. The issue started after I added a CR2032 RTC battery. Even after removing the battery and resetting, the problem persists. I recall encountering the same issue with my first Inkplate.
Originally submitted via the contact form on soldered.com on 11 November 2023. Migrated to the forum for community visibility.
Soldered Support:
Did you update the library? I’ve tested that exact code and only get DEEPSLEEP_RESET, never POWERON_RESET. I’m looking for a battery to test with and will do so soon. Please try uncommenting rtc_gpio_isolate(GPIO_NUM_12) - this may stop the resetting.
Attachment omitted in migration: image.png
Customer:
I deleted the library in Arduino IDE and reinstalled it. I can confirm the output shows the issue. For you to reproduce the bug, TIME_TO_SLEEP must be set above 2 * 60 seconds - your log shows 38s which is why you didn’t see it. Your device doesn’t wait the full 2 minutes.
Attachment omitted in migration: Inkplate6COLOR_Simple_Deep_Sleep.log
Attachment omitted in migration: Inkplate6COLOR_Simple_Deep_Sleep_uncomment.log
Soldered Support:
I finally reproduced this by increasing the time as you mentioned. The Brownout detector is being triggered, indicating the voltage powering the ESP32 drops below a certain threshold. This appears to be a hardware design issue - the on-board capacitors are being emptied out over longer periods. We’re adding this for detailed review to determine what can be done to prevent it.
Soldered Support:
The hardware team identified that the color panel could be causing this. We’re addressing it by disabling the panel when the device goes to sleep. This will consume extra current during sleep but should make deep sleep wakeup stable and working correctly each time.
Soldered Support:
Here’s an updated version of the Inkplate library that addresses this issue: https://github.com/SolderedElectronics/Inkplate-Arduino-library/tree/ip6ColorSleepFix
You need to call:
display.sleepColorPanel();
just before:
esp_deep_sleep_start();
This has already been done in the examples. Please test and let me know if it’s better now.
Customer:
Unfortunately it doesn’t fix the issue.
Attachment omitted in migration: ouput.png
Attachment omitted in migration: Inkplate6COLOR_Simple_Deep_Sleep.ino
Soldered Support:
We figured out what it was - an internal ESP32 function needed to be called additionally. Please try this branch again: https://github.com/SolderedElectronics/Inkplate-Arduino-library/tree/ip6ColorSleepFix
We’ve managed to fix the double-reset issue. Note that current consumption in sleep is now higher, so the battery will drain faster than usual in deep sleep - we’re working on optimizing that next. On our Inkplate device it didn’t double reset even after 10 minutes.