Electron not rousing from Deep Sleep using WKP pin

Hi all - this issue has changed from the original topic I posted so I'm creating a new linked discussion. I hope this is the right way to post this!

Basically I have an Electron in Deep Sleep and a momentary switch connected to the WKP pin. I'm expecting a push of the momentary switch to wake up my Electron, but it's not. The same configuration works in Stop mode, but doesn't work in deep sleep. Here's how it's hooked up:

Continuing the discussion from Startup() macro not running when waking Electron from sleep():

I’m not sure if the switch being connected to WKP & pin A5 will cause any issues.

Can you try touching the WKP pin with GND and 3.3-5V and see if it wakes up properly with the button on the breadboard removed?

I used this sleep code to WKP from a PIN.

System.sleep(D0, RISING,sleepInterval * 2, SLEEP_NETWORK_STANDBY);
1 Like

If you expect A5 to be HIGH in deep sleep to provide a RISING edge to WKP when you push the button you’re out of luck - deep sleep is not meant to hold any output state on GPIO pins.

You’d need to have the switch close to 3v3 or Vin to get a reliable RISING edge.

3 Likes

Ah, thank you @ScruffR, I wondered where the heck the power was coming from. Jumped the button pin that was in A5 over to the 3v3 pin and it worked immediately.

2 Likes

Does this mean that having a pinMode set to INPUT_PULLUP you wouldn’t get the reliable 3.3v for RISING edge?

@davewise, during deep sleep ALL pins are floating meaning setting INPUT_PULLUP prior to sleeping will not do anything.