7

Is there a high-resolution timer (microsecond resolution or better) available on the BeagleBone (TI AM3358 ARM Cortex-A8 based) development board?

Telaclavo
  • 4,867
  • 19
  • 28
hotpaw2
  • 4,731
  • 4
  • 29
  • 44
  • You can use the Cortex A8 cycle counter, see here: [How to measure program execution time in ARM Cortex-A8 processor?](http://stackoverflow.com/q/3247373) – Guy Sirton May 24 '12 at 02:43

2 Answers2

9

Yes, DMTIMER - see page 3729 of the Sitara Arm Cortex A8 Technical Reference Manual. It can accept a wide range of clock frequencies and has a programmable prescaler allowing values from 1 to 256. For example, it has a precision of 37ns when fed a 27MHz clock with a prescaler of 1 (Table 20-1 in the manual). However, if you're using an operating system chance are it's already utilizing that timer and you'll be dependent on the operating system for timing.

AngryEE
  • 8,669
  • 20
  • 29
2

Depending on what you're trying to do, in addition to the dedicated timers listed in other answers you can use the embedded PRU Programmable Realtime Unit modules in this processor to do high speed timing. In addition to the main CPU there's two embedded CPU cores capable of running at 200MHz with most instructions running in a single cycle (5ns). Each core has a 32 bit cycle counter providing 5ns resolution. In combination with the dedicated interrupt controller per core, these units allow incredible timing precision for capturing/generating events.

The effort required to configure and use the PRU will be much higher than using a dedicated timer.

Austin Phillips
  • 1,611
  • 8
  • 9