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: Regd delay


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]