public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] How to change CYGNUM_HAL_RTC_PERIOD ?
@ 2003-10-21 17:07 Zi Zhou
  2003-10-22 11:30 ` Nick Garnett
  0 siblings, 1 reply; 2+ messages in thread
From: Zi Zhou @ 2003-10-21 17:07 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I am trying to understand eCos Real time clock, especially 
CYGNUM_HAL_RTC_PERIOD.  Is this the parameter that decides how many 
machine cycles each tick should have, in other words,  the machine cycle 
interval between timer interrupt? If my reference board is 100MHz and 
CYGNUM_HAL_RTC_PERIOD = 10^6,  is it safe to say with everything else 
the same, the processor runs at 133MHz, I should change 
CYGNUM_HAL_RTC_PERIOD  to 1.33 x 10^6 if I don't change RTC Numerator 
and Denominator?

thanks a lot !

Zi


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

* Re: [ECOS] How to change CYGNUM_HAL_RTC_PERIOD ?
  2003-10-21 17:07 [ECOS] How to change CYGNUM_HAL_RTC_PERIOD ? Zi Zhou
@ 2003-10-22 11:30 ` Nick Garnett
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Garnett @ 2003-10-22 11:30 UTC (permalink / raw)
  To: Zi Zhou; +Cc: ecos-discuss

Zi Zhou <zzhou@3upsystems.com> writes:

> Hi,
> 
> I am trying to understand eCos Real time clock, especially
> CYGNUM_HAL_RTC_PERIOD.  Is this the parameter that decides how many
> machine cycles each tick should have, in other words,  the machine
> cycle interval between timer interrupt? If my reference board is
> 100MHz and CYGNUM_HAL_RTC_PERIOD = 10^6,  is it safe to say with
> everything else the same, the processor runs at 133MHz, I should
> change CYGNUM_HAL_RTC_PERIOD  to 1.33 x 10^6 if I don't change RTC
> Numerator and Denominator?

Essentially, yes. The period is usually the value to which the timer's
counter or compare register is initialized. It is usually the number
of cycles of the timer input clock needed to generate the required
interrupt rate. The presence of (often programmable) PLLs and dividers
in the path means that this is seldom a direct feed from either the
crystal or the CPU clock.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

end of thread, other threads:[~2003-10-22 11:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-21 17:07 [ECOS] How to change CYGNUM_HAL_RTC_PERIOD ? Zi Zhou
2003-10-22 11:30 ` Nick Garnett

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