Go Down

Topic: How to reset Due´s pending Interrupts (Read 2746 times) previous topic - next topic


Hi All,

For debouncing a button connected to an interrupt I used the following procedure in the past:
disable the Interupt in its associated routine
and start a timer to match in a few milliseconds
in timer´s routine delete the flag in EIFR
and re enable the interrupt.

Now Im using the Due with the new core and tried the following to delete the pending flag:

and / or
Pio* pPio = PIOA;
uint32_t dwReg = pPio->PIO_ISR;

but every time i do attachInterrupt(45, Menu_Button, FALLING); after that
the routine starts immediately.

I would be happy about every hint.


Hello aSchindler,
I noticed you're clearing PIOC and enabling PIOA. What's your button's PIO? Regards!




Sorry abut confusion I use 3 Buttons and posted the code from different ones.

It is working!!! Thanks for this sugestion.

My problem is solved but just for curiosity because i spend so many hours for searching the pending flag. How can I reset pending Interrupts?

Thank you guys.

Go Up