[ECOS] Timing considerations

Eric Doenges Eric.Doenges@DynaPel.com
Thu Sep 11 13:37:00 GMT 2003


eibach@gdsys.de wrote:

[ ... ]
> My idea was the following:
> - use the EB40A hardware driver for the serial port
> - poll the driver every 1 ms using the cyg_io_read command (non-blocking)
> - polling could be triggered by an alarm
> - that would require a clock with a timing faster than 10 ms between ticks (which is the standard)
> - so i use CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_... options to set the ticks to 100 us
> - then i can trigger the alarm every 10 ticks
> 
> Am I on the right way? Has anybody better ideas?
> Could changing the time between ticks cause any problems?

Since every tick will cause an interrupt, you might end up swamping your
target. 100us seems a pretty hefty load for an EB40 to me (I have run
an application successfully with 100us timer interrupts under QNX, but
that was on a 300MHz AMD K6 pc).

If your application is not going to be doing anything else while waiting
for the serial data, it would probably be better to poll the timer to
check if 1ms has passed.
-- 
--------------------------------------------------------------------
|     Eric Doenges              |     DynaPel Laboratories GmbH    |
|     Tel: +49 89 962428 23     |     Fraunhoferstrasse 9/2        |
|     Fax: +49 89 962428 90     |     D - 85737 Ismaning, Germany  |
--------------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list