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

[gen3] hal: fix power leak on Boron #2452

Merged
merged 2 commits into from
May 21, 2022
Merged

[gen3] hal: fix power leak on Boron #2452

merged 2 commits into from
May 21, 2022

Conversation

XuGuohui
Copy link
Member

@XuGuohui XuGuohui commented May 17, 2022

Problem

Boron entering hibernate mode after startup in MANUAL mode consumes ~700UA current, which beyonds the expected <100uA. The root cause of the issue is that the modem uart is initialized on startup, while the system sleep API checks that the cellular interface is off so that the modem off procedure is not performed, thus, the modem uart is kept on.

Solution

Controls the modem uart according to the modem power status after startup.

Steps to Test

Run the simple example below on a Boron, it should consum <100uA after it enters hibernate mode.

Example App

#include "Particle.h"

SYSTEM_MODE(MANUAL);

void setup() {   
    delay(10s);

    SystemSleepResult res = System.sleep(SystemSleepConfiguration().mode(SystemSleepMode::HIBERNATE).gpio(D2, RISING));
}

void loop() {

}

References

N/A


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 requested a review from avtolstoy May 17, 2022 09:52
@XuGuohui
Copy link
Member Author

Oh, we probably need to apply the fix for Quectel-based platforms.

@XuGuohui XuGuohui requested a review from avtolstoy May 17, 2022 16:14
@XuGuohui XuGuohui merged commit dcb80fb into develop May 21, 2022
@XuGuohui XuGuohui deleted the fix/boron_power_leak branch May 21, 2022 16:46
@technobly technobly added this to the 4.0.0 milestone Jun 17, 2022
@technobly technobly added the bug label Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants