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: Is possible to make delay function less than one clocktick delay in ecos program?


On Fri, 2002-10-11 at 10:21, Qiang Huang wrote:
> Hi all:
>     Is the following correct:
> clock rate 50MHz
> CYGNUM_HAL_RTC_NUMERATOR = 1000000000
> CYGNUM_HAL_RTC_DENOMINATOR = 100
> CYGNUM_HAL_RTC_PERIOD = 50000000/CYGNUM_HAL_RTC_DENOMINATOR = 500000 clock
> cycles/tick
> 10ms/tick
> 
> so if I want to delay less than 10ms (1 tick) is that possible? Does the
> delay depend on the tick resolution?

The tick time is exactly 1/CYGNUM_HAL_RTC_DENOMINATOR seconds.
In this example (and the default for eCos), 10ms.

If you want the tick to run at 1ms, just change the denominator
to be 1000.

-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


-- 
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]