[ECOS] CYGNUM_HAL_RTC_PERIOD help
Gary Thomas
gary@mlbassoc.com
Tue May 9 16:33:00 GMT 2006
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
More information about the Ecos-discuss
mailing list