-
Notifications
You must be signed in to change notification settings - Fork 143
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
[sam] GPIO setOutput overrides peripheral control #822
[sam] GPIO setOutput overrides peripheral control #822
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.
Great!
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.
Thanks, could you also do it for setInput()
? On STM32 this will also reset the alternate function mode to plain input.
I will also make the same change for the other SAM GPIO implementation and add it here. |
a4da024
to
cfbd963
Compare
That seems pretty sensible. Done. |
I found another bug in the other GPIO implementation (D2x, D/E5x). Calling |
I have pushed the fixes for the SAM D21, D/E5x, GPIO implementation. I will test it tomorrow on a E54 dev board. |
It works. I cherry-picked the commits onto the SAME5x PR. With the changes from this PR the button on the dev board works, without them it doesn't. That's proof enough for me. I will squash the fixup commits and rebase. |
Calling setOutput now overrides peripheral control of the pin. This behavior is consistent with the STM32 GPIO implementation, this commit also ensures output value is set before the output drive is enabled to prevent glitch. Co-authored-by: Christopher Durand <[email protected]>
72170ff
to
c868f59
Compare
Calling setOutput now overrides peripheral control of the pin, which is
consistent with the STM32 GPIO implementation. This commit also
ensures output value is set before the output drive is enabled to prevent
glitch.