Android clock is running too fast

198 views
Skip to first unread message

vaclavpe

unread,
Nov 25, 2010, 8:51:31 AM11/25/10
to android-porting
Hello all,

we are trying to port Android eclair to one mobile phone. During boot
of Android, correct time is read from RTC. But then, Android time is
running approximately two times faster than "universe time". If the
time is not read correctly and counting is from 0:00, after 1 "Android
hour" ( time 1:00) it stops counting.

Where should we have a look ? How is system time done internally ?
Callback to linux kernel ? Or wrong periodic read of /dev/rtc ? Or we
need to calibrate the time somehow ?

Thank you in advance,
Vaclav

Srikant

unread,
Nov 26, 2010, 9:13:55 PM11/26/10
to android-porting
Android Alarm files will communicate to Alarm driver inside Linux
Kernel though ioctls, which in turn calls RTC driver set time and get
time functions.
These drivers located at drivers/rtc/

Deva R

unread,
Nov 29, 2010, 4:31:54 PM11/29/10
to w.sre...@gmail.com, android-porting
linux kernel ticks are updated at wrong rate.,
you might need to cross check your timer counter (generate interrupt at precise jiffies interval) and monitor isr..


vaclavpe

unread,
Nov 30, 2010, 2:03:03 PM11/30/10
to android-porting
Hello Deva,

thank you for your answer. I thought it so, but I could not find where
and how jiffies are computed.

I am not sure, how it works when kernel is changing its CPU clock
frequency (and S3c6410 does it for sure). I feel that it must be
invariant to clock frequency, is'nt it ?

Regards,
Vaclav
> > unsubscribe: android-porti...@googlegroups.com<android-porting%2Bunsu...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages