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

Re: Hardware clock on dual G4 highly inaccurate?



On Thu, Jan 30, 2003 at 07:02:32PM +0100, Benjamin Herrenschmidt wrote:
> > It is supposed to be relatively accurate, but you have a problem with
> > some of the RTC chips which have a correction factor register. I don't 
> > remember the details, but instead of trying to spread out the correction
> > evenly, they concentrate them in some sorts of bursts with occasionnally
> > long or short seconds. 
> 
> Ouch. Ok, well, I'll investigate when I have such new HW at hand (soon
> hopefully).

Just to scare you, straight from the M48T59 documentation:

"Calibration occurs within a 64 minute cycle. The first 62 minutes in the 
cycle may, once per minute, have one second either shortened by 128 or 
lengthened by 256 oscillator cycles. If a binary '1' is loaded into the 
register, only the first 2 minutes in the 64 minute cycle will be modified; if
a binary 6 is loaded, the first 12 will be affected, and so on."

Taking into account that the oscillator is 32768 Hz, 256 more cycles
represent 1 part in 128. Almost 1% if you happen to calibrate on the
wrong second! Of course we could try to calibrate on 3 seconds and take
a majority vote, but I don't like losing so much time at boot for
a stupid hardware bug^Wfeature.

On my VME boards, I have been careful to clear the adjustment register
when I got them (you can set its value with a simple firmware command).

	Gabriel.



Reply to: