From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11238 invoked by alias); 15 Oct 2003 06:54:48 -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 11231 invoked from network); 15 Oct 2003 06:54:47 -0000 Received: from unknown (HELO mail.gmx.net) (213.165.64.20) by sources.redhat.com with SMTP; 15 Oct 2003 06:54:47 -0000 Received: (qmail 19238 invoked by uid 65534); 15 Oct 2003 06:54:46 -0000 Received: from 1Cust219.tnt29.rtm1.nld.da.uu.net (EHLO ericnt) (213.116.152.219) by mail.gmx.net (mp004) with SMTP; 15 Oct 2003 08:54:46 +0200 X-Authenticated: #14554654 Message-ID: <000201c392e9$55a15ea0$e33922c7@ericnt> From: "Eric de Jong" To: References: Date: Wed, 15 Oct 2003 06:54:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Subject: Re: [ECOS] Maximum sampling rate X-SW-Source: 2003-10/txt/msg00237.txt.bz2 > The signal might go up to 500KHz > (sampling at 1MHz+), target is ARM7 100MHz clock (or more). A 100MHz target, sampling pin at 1MHz? Should be easy with a software loop, 100 cycles for 1 sample. As for interrupts, the ecos interrupt handler has too much overhead for this. However, you could write your own interrupt handler in assembly which could be very fast. What kind of signal is it? random? Create a 1MHz timer, connect a timer output pin to the FIQ input. Write a FIQ interrupt handler which samples your pin and stores the result in a 32 bit register, and every 32 time in memory. As the arm has dedicated FIQ registers this could be really efficient. You might have to modify the ecos sources to always enable the FIQ. pwm signal? Maybe you could configure the timer to capture the period once in a while. success, eric. ----- Original Message ----- From: "Vincent Leclaire" I'm afraid I agree with you... I did not even thought about doing it "by hand" since I will anyway have to reproduce it and have to be quite independant of the processor clock (several-target-system!). My original idea was to use an high-speed timer that would trigger interrupts, with all the overhead involved, etc. It is theoretically possible for sure but I am looking for real-world information... even if I'm afraid I know the answer :-) (just a precision - this operation will only have to take place from time to time and will not last for long, so the issue is really about feasability: it is acceptable to have only this running when it happens !) -----Original Message----- From: Gary Thomas > 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. -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss