public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Ticks resolution
@ 2001-03-28  9:47 Cristiano Ligieri Pereira
  2001-03-28 10:41 ` Jonathan Larmour
  2001-05-25 22:39 ` [ECOS] net and snmp EPKs di yan
  0 siblings, 2 replies; 3+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-03-28  9:47 UTC (permalink / raw)
  To: ecos-discuss

Hi everybody,

I would like to understand better how the RTC works in eCos. I'm currently
using i386 platform. In the file hal_i386_pc.h I see the definition of
three constants :

#define CYGNUM_HAL_RTC_NUMERATOR	1000000000
#define CYGNUM_HAL_RTC_DENOMINATOR   100
#define CYGNUM_HAL_RTC_PERIOD		11932

According to the documentation, I've seen that numerator over denominator
gives me the duration between two 'ticks' in nanoseconds. So for these
definitions, one can see that between two ticks we have 10,000,000
nanoseconds or 10 miliseconds. Or in other words 100 ticks per
second. Right?

What if I wanna have more resolution. What should I do to delay some task
for less than 10 miliseconds? Lets say 1 milisecond. Should I just modify
the numerator to 100,000,000 (divide the define value by 10) and
recompile. If so, how far can I go with this?

In the same file there is a comment like this:

/*
Not really sure exactly how these are used...  but the RTC period is
based on the clock input to the 8254, which is 1193180Hz.  
CYGNUM_HAL_RTC_PERIOD is set for 100 ticks per second.

Note also that the real-time clock stuff is a bit misleading: this only
configures the interval timer; we have another actual real time clock
instead.
*/

I'm also not sure about how all this works. Can someone clarify it to me,
please?

thanks a lot in advance,

Cristiano.

------------------------------------------------------------
Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-25 22:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-28  9:47 [ECOS] Ticks resolution Cristiano Ligieri Pereira
2001-03-28 10:41 ` Jonathan Larmour
2001-05-25 22:39 ` [ECOS] net and snmp EPKs di yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).