This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Time problem: Clock running slow
- From: Iris Lindner <ilindner at logopak dot de>
- To: ecos-discuss at sourceware dot org
- Date: Thu, 2 Sep 2010 10:31:18 +0200
- Subject: [ECOS] Time problem: Clock running slow
Hi everyone,
we just encountered a problem with our clock: It is running slow with
approximately 24 seconds per hour.
Some information: We use a PowerPC MPC8347 and its RTC (hardware wallclock).
As far as I could see there is an optimization for reducing i2c actions: Once
at startup the RTC is read in get_current_time() (with get_hw_seconds()).
Afterwards get_current_time() always returns the result of this first read
out plus cyg_current_time()-result.
This leads to a correct time at booting, but from then on the mentioned delay
of 24 sec per hour.
The real-time clock constants are: numerator=1 000 000 000, denominator=1000,
period=66500 (so 1 tick = 1 ms). (And I've verified the chip's I/O bus speed
as well as the basic core speed.)
Could there be a problem with these constants? Or perhaps interrupts
disturbing the clock interrupt?
Thanks in advance for any help / idea / comment!!
cu
Iris
--
Iris Lindner
Software Development
Industrial Print and Apply Labelling
www.Logopak.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss