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 :

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwi2t6uduqTNAhWGLMAKHbGmD4cQFggeMAA&url=http%3A%2F%2Fwww.atmel.com%2Fimages%2Fatmel-11057-32-bit-cortex-m3-microcontroller-sam3x-sam3a_datasheet.pdf&usg=AFQjCNHvKFfjw5Ij6XeD3i0_tJSgdI4eHw&sig2=XgxD-IbkEk2UHy9twCF2pA 8)

Hi

See this tutorial for timers interrupts :

http://ko7m.blogspot.fr/2015/01/arduino-due-timers-part-1.html

Hi there @aliali6624,

Have a look to library tc_lib, available at:

https://github.com/antodom/tc_lib

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.