From: Paolo G. <pao...@ti...> - 2003-09-16 12:23:23
|
Yes... we also noted that. I never checked the real frequency of the system, but we noted that the system was not going properly compared to an external alarm. Giacomo implemented a clock correction algorithm based on the Pentium RTC that also uses the real-time clock of the PCs. It has been submitted as a patch to Luca, and it is currently part of the Shark distribution. you have to check the value of the following two variables in oslib/advtimer.c: unsigned char use_tsc = 1; //Enable the TSC counter mode unsigned char use_cmos = 1; //Enable the RTC correction ...they should be both 1. I also think that Giacomo prepared a small note on the clock correction, but I think that he never published it yet... (Giacomoooo???) bye PJ On Tue, 2003-09-16 at 13:27, Ian Broster wrote: > We've got a serious problem of clock drift in Shark. > Over 1 second, sys_gettime() loses about 50us > compared to the machine running linux. > > I note that oslib/kl/event.c and oslib/ll/sys/ll/time.h > make use of a magic number 1197, relating to > 1.19718 MHz. Should this be 1.193182 MHz? > > I'm not sure about this, particularly as the > ratio of these two frequencies (1.10032) does not > quite match our clock drift discrepancy (1.0059). > > > ian -- Paolo Gai <pao...@ti...> Scuola S. Anna |