-
Notifications
You must be signed in to change notification settings - Fork 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
saml21/gpio: Allow multiple EXTI at the same time #6932
Conversation
Signed-off-by: dylad <[email protected]>
After looking at cpu/samd21, I'm wordering if this bug is also present on SAM(R/D)21. edit: typos |
I just ran a test using a samd21g18a and two EXTI appeared to work fine with latest master:
Let me know if I am missing something or you want me to try something else... |
@photonthunder Thanks a lot for testing it ! |
@photonthunder BTW, did you notice the call to |
@dylad thanks. I was troubleshooting because I couldn't get it to work initially and through those in. I took them out and it was still functional. |
@dylad, I have no strong opinion on the change and tend to give an ACK. Maybe other maintainers will have comments ? @haukepetersen ? |
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.
ACK
verified 2 exti lines simultaneously working on the |
This PR proposes a fix for #6904
To sum up, having one EXTI on saml21 works fine but if you try to enable several exti only the first one works.( all init said it's ok but only the first works)
The problem is any attempt to write into
EIC->CONFIG
failed after EIC is enabled (EIC->CTRLA.reg = EIC_CTRLA_ENABLE;
)SAML21 datasheet said that
EIC->CONFIG
registers are protected after EIC is enable. (27.6.2.1. Initialization -> page 473 of saml21 datasheet)Another solution would be (disable EIC at the end of the function, change
EIC->CONFIG
reg and re-enable it):Let me know what you think about it.