mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #16319 from jue89/fix/stm32-gpio_all-isr
cpu/stm32/gpio_all: fix IRQ handler for G0/L5/MP1 families
This commit is contained in:
commit
5fd6daac3e
@ -341,15 +341,16 @@ void isr_exti(void)
|
||||
{
|
||||
#if defined(CPU_FAM_STM32G0) || defined(CPU_FAM_STM32L5) || \
|
||||
defined(CPU_FAM_STM32MP1)
|
||||
/* only generate interrupts against lines which have their IMR set */
|
||||
uint32_t pending_rising_isr = (EXTI->RPR1 & EXTI_REG_IMR & EXTI_MASK);
|
||||
uint32_t pending_falling_isr = (EXTI->FPR1 & EXTI_REG_IMR & EXTI_MASK);
|
||||
/* get all interrupts handled by this ISR */
|
||||
uint32_t pending_rising_isr = (EXTI->RPR1 & EXTI_MASK);
|
||||
uint32_t pending_falling_isr = (EXTI->FPR1 & EXTI_MASK);
|
||||
|
||||
/* clear by writing a 1 */
|
||||
EXTI->RPR1 = pending_rising_isr;
|
||||
EXTI->FPR1 = pending_falling_isr;
|
||||
|
||||
uint32_t pending_isr = pending_rising_isr | pending_falling_isr;
|
||||
/* only generate interrupts against lines which have their IMR set */
|
||||
uint32_t pending_isr = (pending_rising_isr | pending_falling_isr) & EXTI_REG_IMR;
|
||||
#else
|
||||
/* read all pending interrupts wired to isr_exti */
|
||||
uint32_t pending_isr = (EXTI_REG_PR & EXTI_MASK);
|
||||
|
Loading…
Reference in New Issue
Block a user