This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Timing considerations
- From: Eric Doenges <Eric dot Doenges at DynaPel dot com>
- To: eibach at gdsys dot de
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Thu, 11 Sep 2003 08:36:19 +0200
- Subject: Re: [ECOS] Timing considerations
- References: <DIIE.00000956000588E8@gdproxy2.gdsys.de>
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