Big power advantages exist for using the ULP ( Ultra Low Power ) processor for regular tasks like recording a state change from a GPIO or ADC input, storing the information within the RTC memory, then waking the main CPU up when the information needs to be transmitted via Lora.
The programming of the ULP can now be done via a simple MicroPython wrapper:
LoBo MicroPython for ESP32
adds RTC.read and RTC.write
NB: Still looking for an example of how the RTC memory can be accessed from the MicroPython code running on the main CPU.
I guess this example code is managing to access the RTC memory: github.com/ThomasWaldmann/py-esp32-ulp/blob/a19ae7b104a129fa0b3f7e228cebcf71bcebbf8c/examples/counter.py
while True: print(hex(mem32[ULP_MEM_BASE + load_addr] & ULP_DATA_MASK))