This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: CYGNUM_HAL_RTC_PERIOD help
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Ram Sudhir Tadavarthi <ram dot tadavarthi at netco dot de>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Tue, 09 May 2006 10:33:24 -0600
- Subject: Re: [ECOS] CYGNUM_HAL_RTC_PERIOD help
- References: <20060509160808.08CA0214737@gemmini.netco.de>
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