This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Is possible to make delay function less than one clocktick delay in ecos program?
- From: Gary Thomas <gthomas at ecoscentric dot com>
- To: Qiang Huang <jameshq at liverpool dot ac dot uk>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 11 Oct 2002 10:24:42 -0600
- Subject: Re: [ECOS] Is possible to make delay function less than one clocktick delay in ecos program?
- References: <BDEPKKELILOKGOAOMONOIEEECAAA.jameshq@liv.ac.uk>
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