On Mon, 21 May 2007, Julien wrote:
> Hello all,
>
> I'm trying to control date&hours with one of my program. To do this,
> I would like to use my TS5620. I read some details in TS7200 manual,
> about addresses of RTC registers (starting at 0x11700000), and about
> the size (just the first 14 bytes).
>
> Unfortunatly, I don't really understand how it works, since I read
> same value from 0x11700000 to 0x1170000E. For example if I write 0xF
> at 0x1170000E, I will read 0xF at 0x11700002 too.
>
> 1) Is it even possible to succeed in what I want ? I mean handle date/
> hours by an application that writes/reads in RTC registers ?
>
> 2) Are these registers linked together ? I can't figure out why I
> read the same value at an other address after a write operation. My
> code is quite simple, I just use a "mmap" with /dev/mem at
> 0x11700000, and then read or write the first 14 bytes...
>
In linux access to the RTC is through a device /dev/rtc.
There should be a device driver for the RTC.
However in general applications do noit need to access it.
The kernel maintains a system clock internal. Startup procedures cause the
rtc to be read (usually with the heclock utility) to initialise the kernel
software clock, and on shutdown the kernel soft time is written back to
the rtc. In general the kernel timer can be configured to be far more
accurate than the usual run of the mill rtc h/w.
There are functions provided for accessing the kernel's system clock.
for repetitive clocks see
alarm(2)
getitimer(2) setitimer(2)
e.g. at
http://www.quepublishing.com/articles/article.asp?p=23618&seqNum=14&rl=1
remember accuracy depends on the HZ setting for the kernel.
for time see time(2), ctime(3), date(1), ftime(3), gettimeofday(2)
etc.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|