All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Klumpp <matthias@tenstral.net>
To: linux-iio@vger.kernel.org
Subject: Using IIO for high-speed DAQ
Date: Fri, 13 Jan 2017 15:13:53 +0100	[thread overview]
Message-ID: <CAKNHny9CYKzSoyq_-T3q35rq=1y1ekQPXr2Rg1ByhabadMWv9A@mail.gmail.com> (raw)

Hello!
I would like to use IIO for high-speed data acquisition. In order to
do that I implemented a new IIO driver for the ADC chip I am using
(MAX1133, maximum sampling frequency 200ksps).

The initial approach with triggered buffers was way too slow,
achieving only a maximum sampling frequency of 4ksps.
I now changed the driver to use DMA, using the recent code landed in
IIO. The DMA dummy driver was very helpful as a template for writing
the new code and seeing how all parts fit together (why isn't this
included in the kernel?).

I am now achieving sampling frequencies of 6.6ksps, which is far
better but still way below what the chip can do. As a bonus, I got rid
of the need to trigger scans explicitly, which is quite nice for my
application.

In any case, 6.6ksps is still pretty slow, and I would ideally like to
sample with at least 10ksps, and sampling 200ksps would of course be
the ideal goal.

The question is, can IIO do that, and if so, how? Using iio_readdev
from libiio on my device prints a warning about high-speed mode not
being enabled, but I couldn't find much information on how to enable
that properly.
Maybe Lars-Peter Clausen could comment on that.

In general, if I can't use IIO, I would be stuck with rolling my own
driver without the benefit of using the IIO subsystem, or tap into
COMEDI which is a complete overkill for this usecase.

In any case, it would be awesome if someone could give me some
pointers on what to do here (I know Analog Devices uses IIO for an
oscilloscope application, so I guess high sampling rates are possible,
the question is how one can achieve that and if it makes sense at
all).

Kind regards,
    Matthias

             reply	other threads:[~2017-01-13 14:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 14:13 Matthias Klumpp [this message]
2017-01-14 16:12 ` Using IIO for high-speed DAQ Jonathan Cameron
2017-01-14 17:03   ` Lars-Peter Clausen
2017-01-14 17:18     ` Matthias Klumpp
2017-01-14 17:49       ` Lars-Peter Clausen
2017-01-16 14:23         ` Matthias Klumpp
2017-01-16 21:40           ` Lars-Peter Clausen
2017-01-14 17:25   ` Matthias Klumpp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKNHny9CYKzSoyq_-T3q35rq=1y1ekQPXr2Rg1ByhabadMWv9A@mail.gmail.com' \
    --to=matthias@tenstral.net \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.