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

[hal] sleep: allow to enter hibernate mode without specifying any wak… #2086

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

XuGuohui
Copy link
Member

Problem

Gen3 device cannot enter hibernate mode if not specifying any wakeup source.

Solution

Don't check wakeup source availability in sleep HAL if hibernate mode is specified.

Example App

void setup() {
    System.sleep(SLEEP_MODE_DEEP, SLEEP_DISABLE_WKP_PIN);
    // or
    // System.sleep(SystemSleepConfiguration().mode(SystemSleepMode::HIBERNATE));
    // Device should enter hibernate mode here. And it can only be woken up by a reset or power-cycle.
}

void loop() {
}

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)

@XuGuohui XuGuohui added this to the 1.5.1 milestone Apr 23, 2020
@XuGuohui XuGuohui requested a review from avtolstoy April 23, 2020 09:54
@avtolstoy avtolstoy added ready to merge PR has been reviewed and tested and removed needs review labels Apr 23, 2020
@XuGuohui XuGuohui merged commit 47bac6a into develop Apr 23, 2020
@XuGuohui XuGuohui deleted the fix/sleep/ch52865 branch April 23, 2020 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ready to merge PR has been reviewed and tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants