How to continue after deepsleep? #335
Replies: 4 comments
-
I recommend you to read in detail “sleep modes” documentation
if you want to deepsleep then you should keep state and draw again in wake-up (depending on your application) Hint: I’m the board you have an RTC available so it’s a Good idea to use it. That would keep time between deepsleep while there is any kind of power connected to the board |
Beta Was this translation helpful? Give feedback.
-
Thanks Martin, I know all that stuff. The question was more detailed into epdiy and how to handle the "psram is off" situation. Instead of using the onboard rtc I use the sntp-stuff that idf/arduino provides. It works well even during deepsleep and without Wifi. I just do one daily short connect to wifi and wait for time sync. |
Beta Was this translation helpful? Give feedback.
-
If PSRam is off then you need to built your own keep state strategy using NVS or any other way you want (SDCard storage or an external RAM that is ON all the time) Check https://github.com/atomic14/diy-esp32-epub-reader that is keeping state in a microSD card: Compresses the framebuffer and saves, opens it back on wake-up, decompresses and that way framebuffer state is saved. |
Beta Was this translation helpful? Give feedback.
-
I don't give much on saving energy. It is a huge clock on a 10" epaper, so every minute a redraw (ignoring how it is done) would eat lotsa power, it does not matter much whether there is an additional wifi-connect every once in a while. plan is to have a look into rtc precision and do some sort of correction, but thats for a later step. load/save the frame buffer was something I was looking for, thought epdiy had it somewhere... So I'm adding more points to my list of thing. Currently I look into i2c. From the Arduino point of view. |
Beta Was this translation helpful? Give feedback.
-
Just for me to start some brainstorming.
I made this example https://github.com/holgerlembke/epdiy/tree/main/examples/Basics/D_Segemented_Sleeping (don't know about its state, my local copy might be more finished).
Problem I have: how to continue after waking up from deepsleep?
OK, I could start with clear screen etc. but that is not what I want. Currently I do drawing the latest state into the buffer, apply the changes and then update the screen. This works well because the effort to draw the last state is minimal.
But what with a more difficult setup? I have some diagram stuff in the making and would like to avoid recalculating and redraw everything. And as this needs time, it is a waste of deepsleep-potentail.
What do I miss here?
Beta Was this translation helpful? Give feedback.
All reactions