This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Regd delay
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: Prabal Halder <prabalhalder at yahoo dot co dot in>
- Cc: ecos-discuss at sources dot redhat dot com, andrew dot lunn at ascom dot ch
- Date: 24 Mar 2003 10:12:04 +0000
- Subject: Re: [ECOS] Regd delay
- References: <20030324064115.870.qmail@web8201.mail.in.yahoo.com>
Prabal Halder <prabalhalder at yahoo dot co dot in> writes:
> We have doubt regd the delay provided by the function
> :
>
> void hal_delay_us(int us);
>
> My query is :
>
> If we call call this function with the following
>
> hal_delay_us(1)
>
> then what is the amount of delay that we get from
> this, ie 1 us = ? msec.
>
> In our system, for system real time clock,
> 1 tick = 10ms.
>
The length of delay usually depends on the tick frequency of the
underlying timer device. These usually run at rates ranging from the
CPU clock frequency to a few kHz. The us delay code will try to delay
for at least the supplied number of microseconds, but depending on the
timer may delay for somewhat more.
The main purpose of hal_delay_us() is to insert short delays into
device driver code where the hardware needs it. It is not accurate at
very small delays, or suitable for very long ones.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss