Having had a major diversion with hardware issues on a PCB (manufactured with 10 ohm instead of 10k ohm - causing the SPI to not work) I have now got back to test the functionality related to power saving if the AC supply is removed and resuming when the supply is restored. The supply to the photon is battery backed up but to ensure recovery after long potential periods of outage. A lot of power management is employed with the peripheral devices including turning off SPI bus and setting all SPI related pins to INPUT using pinMode().
When the AC power is restored a 50 mS pulse HIGH is made on the wake pin.
What I have now found is that when I call
System.sleep(wake, CHANGE, sleepPeriod); The photon LED is left breathing cyan - in other words it is not turning off the network and sleeping. Then after a period my application watchdog kicks in and does a system resume. Any one else had this issue with System.sleep() on 0.7.0-rc.6?
Edit: I have noticed that after calling the System.sleep() - approximately 2 minutes the photon LED does a red flash SOS followed by 10 flashes (Assertion Failure?).