Go Down

Topic: Timer Interrupts on Due (Read 81 times) previous topic - next topic


I read trough this thread and find it very very helpful!
At the moment i am trying to measure times between signal-flanks. Therefore i need to stop the time between two (external)interrupts. I'd like to do this with a timer - but don't need the timer interrupt.
As far as i can see the actual time is hold in the TC_CV register. How do i get this value?
I saw you make a lot of use of functions like pmc_set_write_protect and others. Where do you get the documentation of these functions from? And why do you know they even exist? :)
Thanks a lot!


Here is a link to the new library version: https://github.com/SomeRandomGuy/DueTimer

Could someone offer some more explanation on this library I am trying to get my head around it.
I would like to set up a 500Khz clock output to a ATA6870. Is this possible using this library?
Does setting up these timers on certain pins have any affects on other parts of the system like the SPI Bus as I am using this to communicate with the ATA6870 which will use a SCK of half the CLK input I provide as recommended in the ATA6870 datasheet?


I am new to ARM processor and I am struggling making the timer work as well. The content in this post have been very helpful. But I have a very very dumb question.

Where did you guys find the reference manual for those functions used in these code?  Like(NVIC_EnableIRQ,  TC_Configure, TC_SetRA, etc). From the files in IDE it seems to be a library from Atmel. I probably used wrong keyword; I tried to search those on google for hours and got nothing.  =( =( =( =( =(   


I used:
1. ATMEL data sheet: http://www.atmel.com/Images/doc11057.pdf
2. API ref:  http://asf.atmel.com/docs/latest/api.html
3. the code (in the arduino dist)

You have to do some homework as none of the above is a tutorial.   Most of the functions/defines were not obvious until I read the code.   Had to do the same thing for the DAC interface (e.g., to enable flexible & word mode updates).



This may be off topic, but is it possible to modify the library to be able to measure pulse duration on a pin using the timer interrupts?

Many thanks for your time in advance

Kind regards Rob

Go Up