Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 6 months ago.
How to access system clock ticks
Hello,
I am working on a timing system and am new to mbed and to a lesser extent ARM processors. I have spent a fair amount of time in the 8-bit MCU world. Is there a way to get access to the system clock ticks? At 96 MHz I should be able to get sub microsecond timing resolution with access to the system clock value.
I did search the site and could not find an answer to this question, probbaly poor search skills.
TIA wade
1 Answer
11 years, 6 months ago.
You could set up a timer to run at full speed. One timer is used by mbed libraries, leaving the others free for your use.
Do you know of an example that does this on the mbed site or do you know where to point me for further information. I have most of today trying to gain access to the timers so I can do this.
TIA wade
posted by 01 Jul 2013Here for example is a code snippet of someone who manually set an interrupt: http://mbed.org/users/microguy/notebook/timer0-example-code/
Not exactly what you want, but a good starting point. You also want to start the timer, make sure it runs at full speed, and then read the current value.
posted by 02 Jul 2013