Interrupts on Arduino DUE

Hello I need some help. I Use the Arduino Due with the Arduino-IDE. I want to generate Interrrupts on the PIO. The Interrupt should generate at a Pin Change and I dont't want to use the attachInterrupt() function. In the following I show the Code from Arduino-IDE. It's just to check if an interrupt occur.

volatile boolean a = 0;

void PIOD_handler()

void setup() 

/*Enables the PIO to control the corresponding pin*/

/*Enables the Input Change Interrupt on the I/O line*/

/*Enables Interrupts on PIOD*/

void loop() 

Can anybody help me? I can't find the mistake

this seems too simplistic to me. you need to be sure that the right device (PIOD) is multiplexed to the SAM's pins. the easiest way to do this is to do pinMode() calls at the beginning.. but it's also possible to use Atmel's PIO_Configure() calls for this. Also a very common thing to look out for is that in many interrupt handlers you will need to readout the interrupt status from some hardware register, otherwise it won't retrigger..

what i would do is check out the attachInterrupt() and pinMode() source code.. as a place to start.

in any case you will need to configure if you want triggering on rising/falling edges or both. see figure 31-7 ..

and indeed in the handler you will have to read out PIO_ISR to clear the interrupt's pending state.