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:
NVIC_ClearPendingIRQ(PIOC_IRQn);
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.