This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Maximum sampling rate
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Vincent Leclaire <vleclaire at awox dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: 14 Oct 2003 11:19:25 -0600
- Subject: Re: [ECOS] Maximum sampling rate
- Organization: MLB Associates
- References: <CE838B1FA9529449BDBA8951D3CD169F1560@sumatra.mop.awox.com>
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 <gary@mlbassoc.com>
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