Synching clock manager
Arun Govind
arun_jeevi at lycos.com
Wed Dec 18 11:00:48 UTC 2002
thank you all..That did work out..
BTW does there exist some documentation for such things somewhere? Or how am I supposed to find such things on my own.. I've had a look on the source tree.. but most often I can't figure where to look for a particular function or which all functions might be used in my application. Can anyone suggest some urls useful to me so that I don't need to bother you all with such silly(?? I think it was too silly) doubts?
Arun
--
On Tue, 17 Dec 2002 08:39:01
Joel Sherrill wrote:
>
>
>Arun Govind wrote:
>>
>> thank you for your response.
>> I wonder what should you have meant by a *separate* hardware clock. I'm using a my PC itself as the target and all I wanted to synch the time with the BIOS time. I used the rtems_clock_set using a hard coded time and that worked. But how can I get the current time from BIOS? Sorry, I don't know much about BIOS routines.. Is there any prebuilt function that will do that?
>
>In general terms, time is managed by two types of devices.
>
> + interval/countdown timer
> + real-time clock
>
>The interval/countdown timer device gives periodic interrupts.
>As part of serving that interrupt, the rtems_clock_tick service
>is called which results in "wall time" being moved ahead one
>tick. It doesn't matter what the time of day is -- it moves
>ahead a tick. This is the basis for all wall time and timeout
>servicing in RTEMS.
>
>The real-time clock is the hardware device responsible for
>letting the system know the real wall time. It is often only
>capable of reporting time to the second resolution. This device
>is battery backed so wall time is maintained when power is off.
>RTC devices often include some small amount of some type of
>non-volatile memory. This is often used for configuration type
>information. Many embedded devices do NOT have this type of device.
>
>The pc386 BSP you are using has routines to read the RTC hardware.
>See pc386/clock/rtc.c but call rtc_read() to get the TOD from the
>HW RTC. Then call rtems_clock_set() to set RTEMS view of the
>TOD.
>
>--joel
>
>> Arun
>> --
>>
>> On Tue, 17 Dec 2002 17:01:53
>> Ian Caddy wrote:
>> >Hi Arun,
>> >
>> >Yes, if you have a seperate hardware clock, you will need to get its
>> >time on startup and then perform:
>> >
>> > /* Now we set our system time */
>> > status = rtems_clock_set(&tRTEMSTime);
>> >
>> >This can be performed in your init task when your system starts up.
>> >
>> >regards,
>> >
>> >Ian Caddy
>> >
>> >
>> >Arun Govind wrote:
>> >> Do I need to call some special routines to synch the rtems clock manager with the hardware clock? I've #defined CONFIGURE_TEST_NEEDS_CLOCK_DRIVER in my test. But any calls to get the current time returns me some time around midnight, January 1st 1988.
>> >> thanks for any help
>> >> Arun
>> >>
>> >>
>> >> _____________________________________________________________
>> >> Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
>> >> http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
>> >>
>> >
>> >
>>
>> _____________________________________________________________
>> Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
>> http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
>
_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
More information about the users
mailing list