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

[Bug]: PowerFSM timed transition preventing light sleep #3517

Closed
todd-herbert opened this issue Mar 31, 2024 · 0 comments · Fixed by #3521
Closed

[Bug]: PowerFSM timed transition preventing light sleep #3517

todd-herbert opened this issue Mar 31, 2024 · 0 comments · Fixed by #3521
Labels
bug Something isn't working

Comments

@todd-herbert
Copy link
Contributor

todd-herbert commented Mar 31, 2024

Category

Other

Hardware

Heltec Wireless Paper All ESP32(?)

Firmware Version

2.3.4.fd704728

Description

Unable to enter light-sleep.

Added some additional debug output, which seems to show that device is kept awake by timed state transition at PowerFSM.cpp L351-L353

As a test, disabling these lines did allow the device to enter stateLS as expected.

Not sure what the intended purpose of the transition is; catch-all for any missed state changes maybe?
Didn't notice any immediate consequences of disabling the dark-to-dark transition. Will do some more testing later so try and identify where, if anywhere, it has an effect.

Light sleep duration was set at 35 seconds during the testing.

Relevant log output

DEBUG | ??:??:?? 67 [Power] Battery: usbPower=0, isCharging=0, batMv=3867, batPct=67
DEBUG | ??:??:?? 71 [PowerFSM] Timed transition: Dark to Dark
DEBUG | ??:??:?? 71 [PowerFSM] darkEnter()
DEBUG | ??:??:?? 87 [Power] Battery: usbPower=0, isCharging=0, batMv=3905, batPct=71
DEBUG | ??:??:?? 101 [PowerFSM] Timed transition: Dark to Dark
DEBUG | ??:??:?? 101 [PowerFSM] darkEnter()
DEBUG | ??:??:?? 107 [Power] Battery: usbPower=0, isCharging=0, batMv=3913, batPct=72
DEBUG | ??:??:?? 127 [Power] Battery: usbPower=0, isCharging=0, batMv=3931, batPct=74
DEBUG | ??:??:?? 131 [PowerFSM] Timed transition: Dark to Dark
DEBUG | ??:??:?? 131 [PowerFSM] darkEnter()
DEBUG | ??:??:?? 147 [Power] Battery: usbPower=0, isCharging=0, batMv=3917, batPct=72
DEBUG | ??:??:?? 161 [PowerFSM] Timed transition: Dark to Dark
DEBUG | ??:??:?? 161 [PowerFSM] darkEnter()
DEBUG | ??:??:?? 167 [Power] Battery: usbPower=0, isCharging=0, batMv=3885, batPct=69
@todd-herbert todd-herbert added the bug Something isn't working label Mar 31, 2024
@andrekir andrekir linked a pull request Apr 1, 2024 that will close this issue
todd-herbert added a commit to todd-herbert/meshtastic-firmware that referenced this issue Apr 1, 2024
todd-herbert added a commit to todd-herbert/meshtastic-firmware that referenced this issue Apr 1, 2024
thebentern added a commit that referenced this issue Apr 2, 2024
* Change wakeup source from EXT0 to GPIO

* Avoid ISR issue on wake

* Detect press from wake reason, instead of digitalRead

* Missing #ifdef

Risky phone-typed commit

* Fix PowerFSM timed transition preventing light sleep
Addresses #3517

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant