public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] Timing considerations
@ 2003-09-11  9:31 eibach
  2003-09-11 13:37 ` Andrew Lunn
  0 siblings, 1 reply; 5+ messages in thread
From: eibach @ 2003-09-11  9:31 UTC (permalink / raw)
  To: andrew; +Cc: ecos-discuss

Hello,

thank you very much for your helpful ideas.
It is really a good idea to do a blocking read in a thread. I was not really aware that this would cause the thread to go sleeping. For sure this is much better than changing the eCos tick timing.

Best regards,
Dirk

-------- Original Message --------
> > one of the things my eCos application has to do is to serve a serial port. 
> > Platform is an Atmel EB40A.
> > 
> > The device connected to the serial port needs answers to its requests 
> > within 1 ms to work properly.
> > 
> > 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
> 
> That's not the way i would do it. eCos is a soft RTOS. Make your
> thread doing the read from the serial port the highest priority. Let
> it do blocking reads. As soon as the data becomes available, the
> thread will be awoken, it can do its work imeadiately and respond with
> the answer. So long as your CPU is fast enough, it should be able to
> respond within 1ms. 
> 
> We have a system with a 233MHz StrongArm. It has to respond to an
> interrupt, do a lot of processing and be finished within 0.8ms. It
> does with 100% of the time, even when the CPU is fully loaded with
> other tasks. The eCos scheduler does a good job of getting higher
> priority threads run when they have stuff to do.
> 
>          Andrew


To: andrew@lunn.ch
Cc: ecos-discuss@sources.redhat.com


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

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [ECOS] Timing considerations
@ 2003-09-11 13:37 eibach
  2003-09-11 13:37 ` Andrew Lunn
  2003-09-11 13:37 ` Eric Doenges
  0 siblings, 2 replies; 5+ messages in thread
From: eibach @ 2003-09-11 13:37 UTC (permalink / raw)
  To: ecos-discuss

Hello,

one of the things my eCos application has to do is to serve a serial port. Platform is an Atmel EB40A.

The device connected to the serial port needs answers to its requests within 1 ms to work properly.

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?

Regards,
Dirk Eibach


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-09-11  9:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-11  9:31 [ECOS] Timing considerations eibach
2003-09-11 13:37 ` Andrew Lunn
2003-09-11 13:37 eibach
2003-09-11 13:37 ` Andrew Lunn
2003-09-11 13:37 ` Eric Doenges

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).