Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Photon/Electron] WKP pin needs to be disabled as a wakeup source on boot to allow its normal operation #1496

Merged
merged 2 commits into from Mar 20, 2018

Conversation

@avtolstoy
Copy link
Member

commented Mar 7, 2018

Problem

See #1447

Solution

Call PWR_WakeUpPinCmd(DISABLE); on boot to allow normal WKP/A7 pin operation.

Steps to Test

N/A

Example App

static system_tick_t last = 0;

void setup() {
    pinMode(A7, OUTPUT);
}

void loop() {
    if (Serial.available() > 0) {
        System.sleep(SLEEP_MODE_DEEP, 30);
    }

    if (millis() - last > 1000) {
        digitalWrite(A7, !digitalRead(A7));
        last = millis();
    }
}
  1. Connect WKP to D7
  2. Run the app, D7 should be blinking at 1Hz
  3. Connect via serial to the device, send any character
  4. The device should go into deep sleep for 30 seconds
  5. After waking up it should continue blinking D7 at 1Hz

References


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)
photon/p1: WKP pin needs to be disabled on boot in order for it to fu…
…nction normally after exiting deep sleep

@avtolstoy avtolstoy requested a review from m-mcgowan Mar 7, 2018

@avtolstoy avtolstoy changed the title [Photon] WKP pin needs to be disabled as a wakeup source on boot to allow its normal operation [Photon/Electron] WKP pin needs to be disabled as a wakeup source on boot to allow its normal operation Mar 7, 2018

@avtolstoy avtolstoy added the bug label Mar 7, 2018

@m-mcgowan

This comment has been minimized.

Copy link
Contributor

commented Mar 7, 2018

I imagine we merge to develop and cherry pick to 0.7.0-rc.7

@m-mcgowan m-mcgowan added this to the 0.7.0-rc.7 milestone Mar 8, 2018

@technobly technobly added confirmed and removed confirmed labels Mar 19, 2018

@technobly technobly modified the milestones: 0.7.0-rc.7, 0.8.0-rc.3 Mar 19, 2018

@technobly technobly merged commit 55b42f2 into develop Mar 20, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@technobly technobly deleted the fix/wkp-pin-after-deep-sleep branch Mar 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.