I checked to see if XIAO could wake up and reconnect after a long sleep.
For the experiment, I used a 220mAh battery, XIAO in DCDC mode and on-board Flash in power-down mode, “non-mbed” BSP.
Peripheral sleeps for 1 hour, then wakes up and reconnects with Central, sending 8 bytes of battery voltage and measured time data. Central is always waiting for a connection from Peripheral and writes the data to the SD when received.
The battery, which used to last only a day when not in sleep mode, can now be used for a week with room to spare. I have also confirmed no problem with long periods of repeated sleep and reconnection.
It performs well enough for my application.
Here is the sketch used for the measurement.
XIAO_BLE_SystemONSleep_3.zip (6.8 KB)