problem with Timer & Interrupt (Due)

i had had an arduino mega 2560

to be faster i change it to Due

but the Timer registers not working on Due . its not a surprise, and i tried to setup the timer registers according to the datasheet like this :

TC_CCR1 = 0x00000001;

but i face with this error :

"TC_CCR1 " was not declared in this scope .

any one know how can i start the timer and read the timer value [u]directly[/u] from registers?

Problem number 2 :)

as u know all the pins of the Due can be define as External Interrupt

but in the reality the Interrupt routine runs just One time

some one told me the status register will not clean automaticlly and the it must be read manually to fix the problem

i checked the datasheet and didnt find this register .... :o

any help will strongly Appreciate ... 8) 8) 8)

Datasheet Link : 8)


See this tutorial for timers interrupts :

Hi there @aliali6624,

Have a look to library tc_lib, available at:

This library abstracts the use of ATSAM3X8E's TC (Timer/Counter) modules. I think it can be useful, even if you just want to have a look to the code.

Have a look to example action_test.ino, it uses an action object which is basically a timed action (callback) which is called from the TC interrupt handler, depending on the period you establish.

I hope it helps.