From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1009 invoked by alias); 14 Oct 2003 17:19:30 -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 947 invoked from network); 14 Oct 2003 17:19:27 -0000 Received: from unknown (HELO hermes.chez-thomas.org) (63.225.98.241) by sources.redhat.com with SMTP; 14 Oct 2003 17:19:27 -0000 Received: by hermes.chez-thomas.org (Postfix, from userid 2000) id 8FB9050E0DE; Tue, 14 Oct 2003 11:19:26 -0600 (MDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by hermes.chez-thomas.org (Postfix) with ESMTP id 8DC0450DF92; Tue, 14 Oct 2003 11:19:25 -0600 (MDT) From: Gary Thomas To: Vincent Leclaire Cc: ecos-discuss@sources.redhat.com In-Reply-To: References: Content-Type: text/plain Organization: MLB Associates Message-Id: <1066151965.30453.115.camel@hermes> Mime-Version: 1.0 Date: Tue, 14 Oct 2003 17:19:00 -0000 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_XIMIAN autolearn=ham version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Subject: Re: [ECOS] Maximum sampling rate X-SW-Source: 2003-10/txt/msg00230.txt.bz2 On Tue, 2003-10-14 at 11:07, Vincent Leclaire wrote: > Hi folks, > > I have to design an application that will sample a given pin in order to > "reproduce" the recorded sequence. The signal might go up to 500KHz > (sampling at 1MHz+), target is ARM7 100MHz clock (or more). > > >From your experience, does this seem feasible safely ? What's the best > way to proceed (I will probably have to use some sort of interrupt/timer > so I'm talking about eCos relationship with interrupt handlers and the > like) ? > Is this some automatic sampling (i.e. triggered by an external clock or timer), or must you do it "by hand?" If you have to do it manually, at these data rates, your processor won't be able to do much of anything except grab samples (one every 2us). I doubt that you could even write code which performs this reliably: while (need_sample) { while (!sample_time) ; collect_sample() } You might be able to use some sort of high speed timer to determine "sample_time", but my guess is that you couldn't ask that question, collect and store a piece of data and get around the loop again fast enough (2us) to keep up. -- Gary Thomas MLB Associates -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss