-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 GPIOTE crashes by checking everything is ok #5253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; I fast-forwarded through your stream and followed the thinking. It would be great if others could test this on hardware.
I'll be able to check the encoders on my hardware once it lands on S3. |
@jpconstantineau You can test the build artifacts from this PR. They are here. |
The BlueMicro840 built fine. Tested it with 5 and 4 encoders. With 4 encoders only, all 4 work as expected. Haven't tested with using other GPIOTE consumers but I expect rotaryio will be fine if the above test is good. |
Tested that countio.deinit() works (does not crash), and alarm + countio can run concurrently |
It is however possible to initialize both pin_alarm and countio on the same pin if done in specific order
Will run, but alarm will not trigger on light sleep (it will on deep sleep)
Will error with:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Fixes #5240 and fixes #5211