Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:
Can someone confirm or deny this (wrt RTP)? If that is the case, why
this is necessary and what would be a way to fix problem?
The most likely cause is an out of whack crystal driving the timer interrupt.
Once the RTC hardware has been consulted by startup to determine the boot
up time, the system just maintains time of day by counting the interrupts
and calulation based on the
timer_rate, timer_scale, timer_load
fields of the qtime entry of the system page (unless of course the
rtc command is run, at which point we reset based on the RTC hardware again).
The first two fields are set by startup, the last calculated by the first
two and the system tick interval requested by ClockPeriod() (usually 1ms).
If the crystal driving the timer interrupt is running at a significantly
different frequency than what timer_rate & timer_scale say, you’ll get the
symptom you’re seeing.
On IBM PC’s startup sets the fields as follows:
#define PC_CLOCK_RATE 838095345UL /* period in femtoseconds /
qtime->timer_rate = PC_CLOCK_RATE;
qtime->timer_scale = -15; / timer_rate is in femtoseconds */
Unfortunately, there’s currently no way to get startup-bios to put in
different values for those two fields.
Brian Stecher (firstname.lastname@example.org) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M 1W8