--- In "Dan" <> wrote:
>
> I've got a ts7800 board with the RTC option. Both hwclock and rtc7800
> exist on my installation seem to work correctly as far as I can tell.
>
> - What is the difference between the two? From what I gather hwclock
> is part of a standard linux distribution that uses an rtc driver to
> access the clock and rtc7800 just goes to the clock directly.
>
> - Why would I want to use one vs. the other?
>
> - If I need to get the date/time in one of my programs, why do I want
> to use the system time instead of the hardware clock time?
>
> Thanks,
> Dan
>
I don't know about first question, but have some experience with second.
RTC delivers time with 1 second resolution. It means, if you read RTC
time several times within one second, you are going to see the same value.
Second, reading RTC time, as far as external chip is concerned, takes
time and resources.
Time is kept in several registries, you have to put them all together
to create time in unix format (milliseconds since 1.1.1970), and you
have to verify that, while reading all this, seconds indicator has not
changed.
On the other hand, reading system time is very fast. No conversion,
just one long int transfered (ok, maybe two).
But there is a catch, at least on 7260.
Due to a bug in implementation of ts kernel, system time is sliding
some 15 seconds a day.
There is a patch which narrows this to 4-5secs/day.
RTC time reference is from a 32kHz crystal laser trimmed to perform
optimally at 25C. It is than able to perform in about 0.5sec/day.
However, if temperature differs from 25, you will have larger errors.
Well, crystals for higher frequencies, such a one used for a system
clock, have better stability over time and temperature range.
So, your mileage in choosing right time reference depends on
conditions you expect for your design.
One solution is to, if you cannot ntp yourself to the better time,
resynchronize system time to the RTC time, few times a day, if
temperature is 'normal'.
If you are really up to it, you can use 'good days', with moderate
temperature, to calibrate your system reference against RTC and use it
all the time (adjtimex is your friend there).
------------------------------------
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/
|