Wake up from deep sleep


I have put my photon into deep sleep with this one line.
So now how do I upload my new firmware?

I can probably erase the firmware through some Reset/Setup combination, but assuming the photon is in a product somewhere else, it seems there’s no way to wake it up using firmware over the air.

Am I right?


If you have physical access to the device, put it in safe mode:

Press the RESET and SETUP buttons at the same time. Release RESET and continue to hold down SETUP until the status LED blinks magenta (red and blue at the same time). Release SETUP. The Photon should then proceed through blinking green, blinking cyan (light blue), fast blinking cyan, and finally breathing magenta.

Your user firmware doesn’t run so it won’t go into sleep mode and you can flash it OTA.


Pretty much what @rickkas7 said, But if u include like a button to ur project or a way to input a signal. you can attach that signal to the interrupt functions(only some pins have this functionality) similar to arduino. You can use this to automatically wakeup ur device via code.


For deep sleep only the WKP pin can be used and needs a rising edge to wake the device (and RESET of course) .

@MustafaAdam, if you want an unattended device to accept firmware updates, you should consider adding the second parameter which tells the device to wake up at a regular interval which allows your code to check whether there is an update available or not (currently only for product devices tho’) and then keep the device awake long enough to pull in the update.

Just to clarify

when a device is in sleep mode, it doesn’t listen for anything cloud related, so it’s obviously impossible to wake the device OTA.