you are correct, when M5Paper is running from USB
M5.shutdown()has no effect.
When M5Paper runs from battery and you call
M5.shutdown(60)that means everything (including the ESP32) is powered down. The only exception is the RTC clock chip which will power on M5Paper after 60 seconds. The program flow does not continue after
M5.shutdown()but starts from the top, eg.
setup()is run again. That is why is seem as time stands still.
The trick is to know the reason the program got started, eg. by power button or by RTC clock. With that knowledge different things can be done in
The RTC clock has a timer flag which when set tells you that the RTC timer has woken M5Paper; if not set then it was a regular restart. I've implemented that for M5CoreInk (which has a similar architecture) here.
Hi Felix! Thanks for the information, but I'm still unclear as to why my program doesn't continually update the display. If it's running though
setup() every time, shouldn't it be initializing the clock to the same time and drawing to the screen? When I run this program, the time is written once, and then the screen is cleared and it's not written to again.