This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

(Slow) internal counter available?

Genius 5820 points

Hi,

I'm aware there exists a CCNT register which counts the clock cycles of the running processor. Since for a 1 GHz Sitara this register will overflow every four seconds I'm looking for something that counts slower with at least 100 kHz but much less than 1 GHz. So my question: is there a register avilable that does nothing more than counting up using a static frequency?

Thanks!

  • Hi,

    All Sitara processors have timers, which can be programmed to count up from a prescaled frequency.
  • From what I understand from the manual these timers do something more different:

    - they count to a specified counter value and then are reset to a given starting value to count from there again

    - they can be used to cause an interrupt and to call a ISR

    - reading of the timer counter register is quite slow, only 16 bit accesses are possible

    What I did not found is how/where to use them without ISR and how to let them count without interruption from 0x00000000 to 0xFFFFFFFF. Beside of that the 16 bit read access to the counter register sounds a bit ugly for me...
  • The timers do count from 0x00000000 to 0xFFFFFFFF once timer reset is released. Registers TCLR and TLDR control the mode and reload value (0x for overflow counting). IRQ can be enabled/disabled via the IRQENABLE_SET/ IRQENABLE_CLR registers.