Google
  Web www.spinics.net

Re: Read CCNT on PXA255

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Now, I am using devmem2.c to mapOSCR in order to get clock cycles for
my code. For a sample, I have written the following code:
int main()
{
unsigned long oscrStart, oscrEnd;
oscrStart = readOSCR();
printf("hello cpp\n");
oscrEnd = readOSCR();
}
But the value OSCR read before and after this hello cpp statement is
EXACTLY same.

It seems using OSCR to count clock cycles is not a good choice?

Junaid

On Wed, Aug 6, 2008 at 3:42 AM, Gilles Chanteperdrix
<gilles.chanteperdrix@xxxxxxxxxxx> wrote:
> Junaid Jamil wrote:
>> Dear Gilles,
>>
>> Thanks for referring me to use OSCR. Actually I m very new to this
>> linux stuff. Can you please show me an example program of how to mmap
>> this. It will be a great help.
>
> Please do not drop the mailing list from CC.
>
> You will find an example of mmaping /dev/mem in the devmem2.c program,
> mentioned by the FAQ for this mailing list.
>
> You will find another example of this in Xenomai sources: Xenomai
> emulates the PC's tsc on ARM by mapping with /dev/mem the hardware
> free-running counter or decrementer used as a timer source, with an
> additional trick to get a full 64 bits tsc. The file of interest is
> include/asm-arm/syscall.h.
>
> --
>
>
>                                            Gilles.
>

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Site Home]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Tools]     [DDR & Rambus]     [Monitors]

Add to Google Google PageRank Checking tool