-
Notifications
You must be signed in to change notification settings - Fork 3k
EFM32 IRQ handling fix #6984
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
EFM32 IRQ handling fix #6984
Conversation
* IRQ handling got updated previously to a non-functional state when both callbacks were registered (it'd fire a fall callback for both rise and fall events). With this update, that faulty behaviour is corrected. Due to delays between the detection of the edge and the handling of the interrupt (and the fact that information about which edge you received on the pin is not stored anywhere), there is no way to be absolutely sure which edge got triggered on the pin. Therefore, we make a best-guess effort by looking at the pin state at the time of IRQ handling, and fire a callback as if that was the end state of the event. This will usually work out fine, except in cases were the signal is toggling faster than the IRQ handler's response time. In that case, a user won't get both callbacks (as expected for a pulse), but only the last event. * Stripped some dead code.
|
Nice done! |
|
My issue also remains solved, while both rise and fall work correctly. |
|
Thanks for the rapid feedback @amq ! |
|
/morph build |
Build : SUCCESSBuild number : 2163 Triggering tests/morph test |
Test : SUCCESSBuild number : 1953 |
Exporter Build : SUCCESSBuild number : 1789 |
Description
This supersedes PR #6976 to avoid reverting back to code we know is faulty (does not detect short pulses). @DBS06
Pull request type