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

Fix Light-sleep for ESP32 #3521

Merged
merged 6 commits into from
Apr 2, 2024
Merged

Conversation

todd-herbert
Copy link
Contributor

Hopefully addresses #3512

Main culprit seems to have been the addition of enableLoRaInterrupt(), which is competing with the hardware button for use of the EXT0 wake source. Using GPIO wake for the button works around this issue.

Secondary issues with ISRs on wake, and PRESS event detection have also been addressed (kludged).

Tested with Heltec Wireless Paper, however this does currently require a hotfix for #3517 to first be applied. Will be separately address soon. Briefly tested with T-Echo. All seems to be running fine, at least at first glance.

I would expect this bug to affect all ESP32 devices(?). It would be good to have the fix independently tested, if anyone has the time / energy to spare.

@todd-herbert
Copy link
Contributor Author

Seems likely that #3517 also applies to all ESP32 devices, not just Heltec Wireless Paper.

@HarukiToreda
Copy link
Contributor

I can confirm that the program button on Heltec V3 now wakes the device from PowerSave mode as it used to. Thank you.
I plugged a multimeter to see when the different states happen:
When powered on device runs at 108mA
Screen goes off after 10min and runs at 104mA
After 11min it goes to PowerSave mode at 11mA
I tested the program button once on 11mA and it wakes up back to 108mA
I restested after 15, 20, 30min and it worked everytime.

I believe you fixed it.

@thebentern thebentern merged commit f2ed0f7 into meshtastic:master Apr 2, 2024
65 checks passed
@todd-herbert todd-herbert deleted the fix-lightsleep branch April 3, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: PowerFSM timed transition preventing light sleep
3 participants