I still wait my M5Paper, so I can't confirm my experience on it.
But, I have no problems with Samsung 128GB Evo uSD on Odroid-Go(other esp32 devboard) using example from esp-idf sdk.
Maybe 16-32Gb limits only in Arduino library?
Thanks for showing the start point of the search. (I go to Github to see the realization of this function and also to see how here working with RTC alarm, gotten PINs, and schematic becomes 100 times clear for me) I can answer my question myself.
At normal POWER_OFF state - PWR_EN point in schematic setted to HIGH (VBAT_IN -> R35 -> D10 - >C94), it,s HIGH state block power from VBAT_IN -> VBAT use FET1 to close this path.
When we push button(and hold it for some seconds) we open path PWR_EN ->D10 -> KEY_PUSH -> GND, which set PWR_EN to LOW and open path VBAT_IN -> FET1 -> VBAT. VBAT powered chain of DC, and power our ESP32. After start ESP32 push the virtual button(FET2) using PS_ON, which opens path PWR_EN->FET2->GND, and stable hold power to DC(and sensors and esp32), and now we can realese push button, and all will still work.
When we set ALARM to RTC PCF8563, and then release FET2, we allow to PWR_EN become HIGH again through 100k resistor R35. When it becomes HIGH, it automatically powers off our ESP32, DC-DC, and sensors. But RTC PCF8563 will still work cause it powered over VBAT_IN.
When alarm time becomes - PWR_EN setted low through path PWR_EN -> D7 -> RTC_ALARM - >INT - > GND. Which allow ESP32 to start again.
When the main MOSFET is powered down, the only way to wake up the device automatically is via the RTC chip (alarm or timer interrupt) and without any previous state (unless written to FLASH/SD). This is a good way of shutting down the device completely.
Hello, I have a question about this - can we power down this main MOSFET during ESP32 program? ( as I understand, you about FET1 between VBAT_IN and VBAT on the schematic which powered step-up to 5V, which powered stepdown to 3.3V which powered ESP32)
It's hard for me to answer this question myself when seeing such schematic - it's really burning my mind.
If it's possible, we have EEPROM to use it like RTC, and lots of pseudo-low-power projects can be done on M5Paper.