[ECOS] RedBoot timer

Gary Thomas gthomas@redhat.com
Sun Sep 16 15:32:00 GMT 2001


On Mon, 2001-09-17 at 01:27, Pushparaj wrote:
> Hi,
> I am working on porting of RedBoot on powerpc platform.
> Presently I am facing problems with implementing the redboot timer. I cannot
> figure out how to implement the function CYGACC_CALL_IF_DELAY_US.  This I guess
> is supposed to give a delay for the parameter passed and should not be interrupt
> driven and also that it should be some kind of loop.
> Could anybody help on this ?

This is exactly what's required of the function - pause for some number
of microseconds (the parameter), without using interrupts and without
disturbing any system resources (e.g. you can't go about reprogramming
the timer used by eCos heartbeat, etc).

There are many examples of this function in the sources.  In most cases,
the macro yields a call to a HAL supplied routine 'hal_delay_us'.  Just 
have a look at them to see how it's done.

Note: on the PowerPC, you can probably just use one of the solutions 
already in place.



More information about the Ecos-discuss mailing list