This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Time problem: Clock running slow


'Lo -

On Thu, 2 Sep 2010, Stanislav Meduna wrote:

On 02.09.2010 14:52, Grant Edwards wrote:

we just encountered a problem with our clock: It is running slow with
approximately 24 seconds per hour.

When you say "verified" do you mean with a recently calibrated
frequency counter?  Your error is only 100ppm (0.01%).

24 seconds per hour is way more than 100 ppm.

Yes, I make it about 0.7% - but it's early for me to do math .. Depending on the timing source that could be bad or just marginal. (I think that's getting near the limit for a UART to reliably resolve 8N1 traffic.)


What parameter controls the interrupt firing speed?
Is there some prescaler in some counter hardware that could
be one off (maybe with value of ~150)?

Is the basic system timed by a crystal, or something simpler (RC network, ..)? If by a crystal, do different units show a different slip rate? Is it fast, slow, or varying? Can you substitute the timing with a calibrated clock? Can you measure the clock source directly and compare it with a reference? Maybe a close look at the crystal will show it's not identically the frequency that appears in the specs.


If the timing frequency is on target, could you be "slipping" interrupts (masking some timing interrupts with service to other high-priority tasks or unintended request resets)? I've seen this on several products. Try toggling an output line in the ISR and look at that pulse train for irregularity and rate.

Finally (well, maybe first-off) how accurate must the timer be for your system to function properly?

- John Mills

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]