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

* Re: [ECOS] Ticks resolution
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Larmour @ 2001-03-28 10:41 UTC (permalink / raw)
  To: Cristiano Ligieri Pereira; +Cc: ecos-discuss

Cristiano Ligieri Pereira wrote:
> 
> 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?

No, the timer is programmed with CYGNUM_HAL_RTC_PERIOD to give you the
interrupts at the correct frequency. The numerator and denominator are just
a way of telling the rest of the system how frequently those interrupts
will occur.

So you have to change PERIOD and update NUMERATOR and/or DENOMINATOR to
*reflect* the change you made to the PERIOD. So if you halve the period to
get interrupts twice as fast, you should either halve the numerator or
double the denominator.

Exactly how far you can go depends on the timer hardware. I don't know
offhand what the 8254 can do.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

* [ECOS] net and snmp EPKs
  2001-03-28  9:47 [ECOS] Ticks resolution Cristiano Ligieri Pereira
  2001-03-28 10:41 ` Jonathan Larmour
@ 2001-05-25 22:39 ` di yan
  1 sibling, 0 replies; 3+ messages in thread
From: di yan @ 2001-05-25 22:39 UTC (permalink / raw)
  To: ecos-discuss

Hi everyone,

Where can I download snmp-1.0by.epk and net-1.0by.epk?

Thanks in advance,

Best wishes,

Di

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

^ 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).