Interrupts on Arduino DUE

HI everybody,

Sorry for my english but i will try to explain clearly my problem.

I'm working on arduino due but it don't work like i want it.
I need to work with registers instead of the arduino functions.
I try to use the pin of my arduino in order to generate an interupt on edge or level.
I have tryed something like that :

void setup() {

Serial.begin(9600);
REG_PIOA_PER=0x00010000;
REG_PIOA_PDR=0xFFFEFFFF;
REG_PIOA_IER=0x00010000;
REG_PIOA_IDR=0xFFFEFFFF;

}

void loop() {

Serial.println(REG_PIOA_ISR,HEX);

delay(1000);
}

Like i understand, the ISR register should set when the interupt is up. But I tried with a square input of 3V but nothing happened.
I have read that i need to use the NVIC first and the PIO controler clock but i'm a little bit lost.

If somebody has already made something like that ?

Look at the code for pinMode() and digitalWrite() and digitalRead() to see how
PIO gets set-up.

Yes, every peripheral in the chip needs a clock, so you need to make sure its
got its clock first of all.

If you're enabling an interrupt you must provide a handler...

Thank for your answer MarkT.

In fact, I was already loocking for the code of PinMode() and other functions but i didn't find them. Can you give me the path to find them. I hope these code are in C and not in other language ?

You said "If you're enabling an interrupt you must provide a handler...".
What does it mean ? .

Thank a lot.

On linux:
find . -name 'wiring_digital.c'
on other OSs there will be other ways to search for a named file.

But its worth learning your way around the Arduino distribution anyway. Just be aware
that avr is the ATmega branch and sam is the SAM3X8E branch.