P2 wake from hibernation sleep on rising WKP pin not working

Just wanted to confirm that there are no ‘known issues’ with wake from hibernation sleep on the P2. On a new board having solved an issue with AC power present signal we are seeing a problem waking the P2 with this signal when the AC power is reconnected following a hibernate sleep. The P2 is being powered off a LiPo backup battery. Stop and ULP sleep both working fine with the same signal. Device OS 6.3.3

Just to be sure, you're using D10 as the WKP pin, correct? (It's in the same position as A7 was on the P1.)

What pinMode are you using?

Is the signal push-pull, use an external pull-down, or internal pull-down?

Is the signal fed from a voltage divider? RISING puts an internal pull-down on the pin which can affect the high voltage when not driven directly.

Does the signal depend on a different GPIO? GPIO outputs are disabled on RTL872x in hibernate sleep mode.

I was able to wake on D10 RISING from HIBERNATE sleep. Momentary switch connected between D10 and 3V3. Tested with Device OS 6.3.3 on a P2.


#include "Particle.h"

SYSTEM_MODE(SEMI_AUTOMATIC);
SYSTEM_THREAD(ENABLED);

SerialLogHandler logHandler(LOG_LEVEL_INFO);

const pin_t WAKE_PIN = D10;

void setup()
{
    pinMode(WAKE_PIN, INPUT_PULLDOWN);
}

void loop()
{
    delay(20s);


    SystemSleepConfiguration config;
    config.mode(SystemSleepMode::HIBERNATE)
      .gpio(WAKE_PIN, RISING) 
      .duration(30s);
    System.sleep(config);
}

Hi Rick,

Thanks for replying and testing so quickly. In answer to your questions, a circuit for combining the AC present signal with the RTC MFP output (for a long term sleep wake) is used which creates a 100 millisecond pulse.

The pin mode setup is:

pinMode(P2_PDU_WAKE, INPUT);

And the sleep configuration is as follows:

SystemSleepConfiguration config;    config.mode(SystemSleepMode::HIBERNATE).gpio(P2_PDU_WAKE, RISING);
System.sleep(config);

Edit - D7 was causing the apparent no wake from hibernation, solution has been to swap R14 for a 200K ohm which then keeps the logic on the pin to 3.0V at boot. D6 didn’t appear to make any difference when disconnected so have left as-is.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.