Skip to content

Conversation

@ABOSTM
Copy link
Contributor

@ABOSTM ABOSTM commented Dec 17, 2021

Summary

interrupts: Disable EXTI when disabling interrupt

When disabling interrupt, it should be done at both NVIC and EXTI level.
This avoid to have pending interrupt at EXTI level after call to
stm32_interrupt_disable(), which could fire the callback as soon as
new call to attachInterrupt(), even without new gpio change.

This PR aims to replace/simplify #1258 (which also replace #1168)

When disabling interrupt, it should be done at both NVIC and EXTI level.
This avoid to have pending interrupt at EXTI level after call to
stm32_interrupt_disable(), which could fire the callback as soon as
new call to attachInterrupt(), even without new gpio change.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
@ABOSTM ABOSTM added the bug 🐛 Something isn't working label Dec 17, 2021
@ABOSTM ABOSTM requested review from cparata and fpistm December 17, 2021 10:28
@ABOSTM
Copy link
Contributor Author

ABOSTM commented Dec 17, 2021

I made a sketch on my side to check that gpio toggle while interrupt is detached doesn't fire callback when interrupts is re-attached.
@cparata,
I know it is an old story, but would be great if you could test on your side the original issue you faced 😃

@cparata
Copy link
Contributor

cparata commented Dec 17, 2021

Hi @ABOSTM ,
I will try next week with motor drivers.
Best Regards,
Carlo

@cparata
Copy link
Contributor

cparata commented Dec 21, 2021

Hi @ABOSTM ,
I did the test with motor driver and the issue, that I saw, is solved with this fix.
So, I approve it! ;-)
Thank you and Best Regards,
Carlo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants