ts-7000
[Top] [All Lists]

Re: [ts-7000] LInux 2.6: Why is EP93XX_TIMER1_LOAD set to 508469

To:
Subject: Re: [ts-7000] LInux 2.6: Why is EP93XX_TIMER1_LOAD set to 508469
From: Jim Jackson <>
Date: Mon, 8 Mar 2010 21:02:08 +0000 (GMT)
>> In linux/arch/arm/mach-ep93xx/core.c  EP93XX_TIMER1_LOAD is loaded with
>> "(508469 / HZ) - 1" to obtain a timer with the HZ frequency. Timer 1 is
>> running at 508 kHz so this seems strange. On the other hand HZ is 100 so the
>> last parts of the load-value is thrown away.
>
> well, it's not exactly 508 kHz as the docs claims, but it's 14.7456 Mhz
> divided by 29 = 508496. The timer is 16-bit only, you can't feed it with this
> value anyway.
>
>> Is there a reason for this?
>
> Yes, it's CONFIG_HZ value, it's a frequency of the timer interrupt, so if it's
> 100, it means, that it will be called 1/100 of second, or 10ms. So if you feed
> it with 508496 it will be called once a second, which is wrong since the timer
> interrupt is heart of the system. So the value 5083 is correct and means the
> timer interrupt is called 100 times per second, every 10ms.

Actually I found 5084 gives a better system clock. Using adjtimex and some 
clockwatching allows one to have a system clock with an accuracy of about 
2ppm (assuming a fairly constant environment). That's about 1 sec drift in 
5 days.


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU