Hello guys
the M5Stack incorporates the IP5306 as power management chip which has an auto shutdown feature (under light load) when running from battery.
The default light load shutdown time is set to 32 seconds. (Other options are 8, 16 and 64 seconds.) Unfortunately I do not see a register or bit in the IP5306 which would allow to turn off that feature. Also what amperage counts as light load I do not know.
In my simulation my M5Stack was turned off by that feature by putting the ESP32 into light sleep for about a minute. (In light sleep the current was about 28 mA.)
BTW: only turning off the screen backlight did not trigger the auto shutdown as the remaining current (about 68 mA) was still high enough I guess.
If indeed the shutdown feature under light load is what turns your M5Stack off, then I guess it is dependent on the program you are running on your M5Stack and how much power it consumes at a given time.
Thanks
Felix