public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] CYGNUM_HAL_RTC_PERIOD help
@ 2006-05-09 16:22 Ram Sudhir Tadavarthi
  2006-05-09 16:33 ` Gary Thomas
  0 siblings, 1 reply; 2+ messages in thread
From: Ram Sudhir Tadavarthi @ 2006-05-09 16:22 UTC (permalink / raw)
  To: ecos-discuss

Dear all,

I am a newbie to embedded world and eCos as well. I am trying to bring up
eCos on Motorola PQ2FADS board. In this journey I have encountered the
Macros CYGNUM_HAL_RTC_PERIOD which depends on CYGNUM_HAL_RTC_NUMERATOR and
CYGNUM_HAL_RTC_DENOMINATOR. I have observed that the proper definition of
these values is required without which the time is calculated incorrectly.

I tried to experiment with these values to find out the correct one but
trial and error did not help. I concluded that I won't be successful without
understanding the underlying concept behind this.

I have read the following documentation 
http://ecos.sourceware.org/docs-latest/ref/hal-clocks-and-timers.html

but still did not understand how to find these values. I only understood
that the period specifies clock interrupt intervals.

Can anyone give me a clue/pointer/reference to further documentation to
proceed further to find out correct CYGNUM_HAL_RTC_NUMERATOR and
CYGNUM_HAL_RTC_DENOMINATOR values?

Thanks a lot in advance.
Ram



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

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

* Re: [ECOS] CYGNUM_HAL_RTC_PERIOD help
  2006-05-09 16:22 [ECOS] CYGNUM_HAL_RTC_PERIOD help Ram Sudhir Tadavarthi
@ 2006-05-09 16:33 ` Gary Thomas
  0 siblings, 0 replies; 2+ messages in thread
From: Gary Thomas @ 2006-05-09 16:33 UTC (permalink / raw)
  To: Ram Sudhir Tadavarthi; +Cc: ecos-discuss

On Tue, 2006-05-09 at 18:22 +0200, Ram Sudhir Tadavarthi wrote:
> Dear all,
> 
> I am a newbie to embedded world and eCos as well. I am trying to bring up
> eCos on Motorola PQ2FADS board. In this journey I have encountered the
> Macros CYGNUM_HAL_RTC_PERIOD which depends on CYGNUM_HAL_RTC_NUMERATOR and
> CYGNUM_HAL_RTC_DENOMINATOR. I have observed that the proper definition of
> these values is required without which the time is calculated incorrectly.
> 
> I tried to experiment with these values to find out the correct one but
> trial and error did not help. I concluded that I won't be successful without
> understanding the underlying concept behind this.
> 
> I have read the following documentation 
> http://ecos.sourceware.org/docs-latest/ref/hal-clocks-and-timers.html
> 
> but still did not understand how to find these values. I only understood
> that the period specifies clock interrupt intervals.
> 
> Can anyone give me a clue/pointer/reference to further documentation to
> proceed further to find out correct CYGNUM_HAL_RTC_NUMERATOR and
> CYGNUM_HAL_RTC_DENOMINATOR values?

The only value you should need to adjust is CYGNUM_HAL_RTC_PERIOD
        cdl_option CYGNUM_HAL_RTC_PERIOD {
            display       "Real-time clock period"
            flavor        data
            default_value { (((CYGHWR_HAL_POWERPC_BOARD_SPEED*1000000)/4)/CYGNUM_HAL_RTC_DENOMINATOR) }
        }

Thus, if you have the value set properly for CYGHWR_HAL_POWERPC_BOARD_SPEED, you
should get the clock running at the right rate.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

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

end of thread, other threads:[~2006-05-09 16:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-09 16:22 [ECOS] CYGNUM_HAL_RTC_PERIOD help Ram Sudhir Tadavarthi
2006-05-09 16:33 ` Gary Thomas

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