This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to change CYGNUM_HAL_RTC_PERIOD ?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]