Photon Deep Sleep with certain pins kept HIGH or LOW

Is it posible for the Photon to System.sleep(SLEEP_MODE_DEEP,60); with certain pins kept HIGH and others LOW?
Apparently all stay LOW despite my efforts.


Nope that’s not possible.
If you need your GPIOs to keep their state you’ll need to opt for “stop sleep” (System.sleep(pin, edge, timeout)).

BTW, during deep sleep they are not LOW but high-Z, so neither HIGH nor LOW (except WKP).

1 Like

@Scruffr is correct however external pull-up and pull-down resistors can be used to leave pins in a desired state when deep sleeping - otherwise it would be impossible to power down any external bus / circuitry with confidence. Clearly on wake or startup such switches need to be turned back on.


I’d look back at your original design… if you need pins kept at certain values, then you imply that you want to keep some external things running, operated or active… that is they will NOT be sleeping and thus using some power, most likely much more that the photon.
So what are you trying to achieve?


Im using P mosfets that I want to keep HIGH in order to turn OFF.
Pull-ups are the solution, especially since the output is supposed to go into high Z.