All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Kinar <n.kinar@usask.ca>
To: Andre Puschmann <andre.puschmann@tu-ilmenau.de>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: Implementing real-time embedded system to sample from five SPI ADCs
Date: Thu, 04 Nov 2010 09:43:17 -0600	[thread overview]
Message-ID: <4CD2D495.6040600@usask.ca> (raw)
In-Reply-To: <4CD26EE0.7040705@tu-ilmenau.de>


> Hi Nicholas,
>
> according to what I understood, you want to use the data coming from 
> your ADCs in a userspace application which implements the control loop.
>
> I think there is a good chance you can then do all the steps (1)-(3) 
> within an userspace application. However, I am not 100% certain about 
> the best solution to implement (2) on this setup. May be anybody else
> knows something about the maximum sample frequency, but this also 
> depends on how complicated your algorithms are.
>
> Here [1] you can find a good example on how to write a RT userspace 
> application. Using the SPI character devices it should also be 
> possible to talk to your hardware.
>
> Regards,
> Andre
>
>
> [1] https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO
>
>

Thanks, Andre; that is a very good link, and thank you for the 
information.  I am hoping that I can sample from the ADCs at a rate of 
at least 1 kHz, and I am wondering if it is best to do this in a 
userspace program or in a kernel driver.

My processing algorithms are not very complicated.  If one of the ADC 
data values is greater than a certain value, then a digital-to-analog 
converter (DAC) control register is updated.  All that I want to do is 
to collect data at a rate of 1 kHz by toggling a port pin and then 
reading the data values over SPI.

Nicholas

      reply	other threads:[~2010-11-04 15:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03 23:06 Implementing real-time embedded system to sample from five SPI ADCs Nicholas Kinar
2010-11-04  8:29 ` Andre Puschmann
2010-11-04 15:43   ` Nicholas Kinar [this message]

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=4CD2D495.6040600@usask.ca \
    --to=n.kinar@usask.ca \
    --cc=andre.puschmann@tu-ilmenau.de \
    --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 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.