From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8427 invoked by alias); 11 Sep 2003 06:35:52 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 8420 invoked from network); 11 Sep 2003 06:35:50 -0000 Received: from unknown (HELO mail.idtinc.de) (195.30.47.34) by sources.redhat.com with SMTP; 11 Sep 2003 06:35:50 -0000 Received: from DynaPel.com (unknown [10.0.2.109]) by mail.idtinc.de (Postfix on SuSE Linux eMail Server 3.0) with ESMTP id 711B1182C5; Thu, 11 Sep 2003 08:40:18 +0200 (CEST) Message-ID: <3F6017E3.6040909@DynaPel.com> Date: Thu, 11 Sep 2003 13:37:00 -0000 From: Eric Doenges User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030626 X-Accept-Language: en-us, en MIME-Version: 1.0 To: eibach@gdsys.de Cc: ecos-discuss@sources.redhat.com References: In-Reply-To: X-Enigmail-Version: 0.76.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [ECOS] Timing considerations X-SW-Source: 2003-09/txt/msg00210.txt.bz2 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