timer value in Due Timer library

hi guyes :wink:

im using arduino DUE and need to using Timer in a part of my project

in fact i need to measuere the "time" between two external interrupt. (not delay or other usage of timers...)

this "time" is in the micro secend range.

so i need to know the value of timer


i read the datasheet of the SAM3x8E >> Timer and counter section , and i get nothing :slightly_frowning_face:

as u know , in the Atmega series of prossesor this "time" is store in the TCNTx Register

i cant find the corresponding register in the ARM processor (Link 1)

another solution:

there is a DueTimerLibrary (Link 2 )that i have the same problem with it.

there is no variable that give me the timer value.

any one know the solution?

what register?

thanks for your time....

Link 1:


Linke 2:


No one dosnt work with DUE timers???

Do you need to use the Timer like this?
On the first interrupt make a note of micros() and one the second interrupt subtract current micros() value from previous stored value.


volatile unsigned long difference = 0;

void ISR_Handler(){
  static unsigned long last = 0;
  difference = micros() - last;
  last = micros();