Skip to content
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

cpu/stm32/gpio: fix IRQ handler #16272

Merged
merged 1 commit into from
Apr 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cpu/stm32/periph/gpio_all.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,14 @@ void isr_exti(void)

uint32_t pending_isr = pending_rising_isr | pending_falling_isr;
#else
/* only generate interrupts against lines which have their IMR set */
uint32_t pending_isr = (EXTI_REG_PR & EXTI_REG_IMR & EXTI_MASK);
/* read all pending interrupts wired to isr_exti */
uint32_t pending_isr = (EXTI_REG_PR & EXTI_MASK);

/* clear by writing a 1 */
EXTI_REG_PR = pending_isr;

/* only generate soft interrupts against lines which have their IMR set */
pending_isr &= EXTI_REG_IMR;
#endif

/* iterate over all set bits */
Expand Down