From: Nicholas Kinar <n.kinar@usask.ca>
To: linux-rt-users@vger.kernel.org
Subject: Implementing real-time embedded system to sample from five SPI ADCs
Date: Wed, 03 Nov 2010 17:06:24 -0600 [thread overview]
Message-ID: <4CD1EAF0.6030709@usask.ca> (raw)
Hello,
I would like to implement a real-time embedded Linux system on an
AT91SAM ARM processor. Attached to the SPI bus of this processor are 5
Analog-to-Digital converters (ADCs) that can be read using the Linux SPI
bus subsystem.
The ADCs are sampled by having the AT91SAM ARM processor toggle a GPIO
at a rate of at least 1 KHz. The GPIO is attached to a pin on the ADC.
A high voltage level on this pin instructs all of the ADCs to take a
sample. The sample is then read over the SPI bus by the embedded system
master. This implies that data will be read from each SPI slave device
every (1 / 1000 Hz) = 1.0e-3 seconds.
I am wondering if the following could be done with real-time Linux:
(1) I would have to write a Linux kernel module to toggle the GPIO pin.
The rate of toggling would be controlled by a high-resolution timer, and
would occur with a period of at least 1 kHz.
(2) After the GPIO is brought to a high voltage level, the master must
wait for at least 3.7 microseconds before reading from the SPI bus.
(3) Each ADC would be read in sequential order.
The ADC being used is the AD7691 from Analog Devices
(http://www.analog.com/static/imported-files/data_sheets/AD7691.pdf).
The data from the ADCs could be used in a real-time control system
loop. Can this be done with real-time Linux, or is the latency too
high? What is the maximum rate at which I could read data from these
ADCs? Could it be 10 kHz or even 100 kHz?
Nicholas
next reply other threads:[~2010-11-04 0:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-03 23:06 Nicholas Kinar [this message]
2010-11-04 8:29 ` Implementing real-time embedded system to sample from five SPI ADCs Andre Puschmann
2010-11-04 15:43 ` Nicholas Kinar
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=4CD1EAF0.6030709@usask.ca \
--to=n.kinar@usask.ca \
--cc=linux-rt-users@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).