Counter frequency

The counter frequency on the Honeycomb board is reported as 25MHz (25000050Hz to be exact).
The LX2160A manual suggests that CNTFRQ can be programmed in secure mode, so is not something the OS can do. Is it possible to get a higher frequency counter?

Thanks,
–Elad

The counter frequency for the Arm Generic Timer and Watchdog is programmable in secure mode, it needs to be programmed to match the clock that is driving it. In the LX2160a case it is 1/4 of Sysclk A or B both of which are 100MHz, which is why the timer is 25MHz. The frequency is programmable not so it can be increased or decreased, but so software can discover the value the system counter is running at.

Thanks for the quick response.
Is there another clock that can be read cheaply from EL0 or EL1 with a higher resolution? 25MHz is a bit coarse for some performance analysis.

–Elad

You want to use the PMU cycle counter that is the high resolution counter that runs at the CPU frequency speed. This is the counter that is used for profiling utilities like perf.

D’oh, should have thought of that. Thanks.

–Elad