linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Kinar <n.kinar-/KKvz3x1pcI@public.gmane.org>
To: Ned Forrester <nforrester-/d+BM93fTQY@public.gmane.org>
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Embedded system control loops and reading from daisy-chained ADCs
Date: Thu, 13 Jan 2011 23:01:41 -0600	[thread overview]
Message-ID: <4D2FD8B5.5090701@usask.ca> (raw)
In-Reply-To: <4D2FD480.4020001-/d+BM93fTQY@public.gmane.org>


> That would help, but I measured interrupt latencies of 100-600usec
> (200us typical) on the PXA255, with occasional longer delays.  That
> was with the network driver busy also.
Thanks for confirming this, Ned.

>> If I have
>> the trigger pin of the daisy-chained ADCs tied to one of the ARM
>> processor's pulse width modulator (PWM) pins, might I be able to trigger
>> a series of samples with PWM, and then read the data over SPI?  I think
>> that a timer would be required, but how would I set up an interrupt to
>> read from SPI once the conversion has been triggered?  I would also have
>> to wait a predetermined time after triggering the conversion to be able
>> to read data from the ADCs.
> If the timer controls the period and pulse width of the trigger, you
> program the trailing edge for the correct acquisition delay, and use
> the trailing edge to generate the interrupt for the driver.
> Alternatively, you could interrupt on the leading edge and then loop
> until the trailing edge (reading a GPIO pin); that would help overlap
> some of the interrupt latency.  This latter idea is only acceptable if
> the acquisition time is short, or if the processor is not busy and
> thus you don't mind generating increased latency for other interrupts
> (normally not a good idea).
Okay, I think that I understand.

> It's been a while since I worked on my driver.  I recall that its
> maximum word size was 32-bits.  I don't recall if there is anything in
> the SPI core that limits that, or if it is simply a driver limit.  If
> the latter, you can write a driver to do anything you want.
I'm not familiar with the SPI core either, and I would also wonder if 
the word size is limited for the ARM architecture.

>
> It sounds like you have a lot of options. Good luck.
>

Yes - I am designing, building and testing an embedded system for my own 
research.  Once again, thank you for your help!

Nicholas




------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl

      parent reply	other threads:[~2011-01-14  5:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-12 16:45 Embedded system control loops and reading from daisy-chained ADCs Nicholas Kinar
     [not found] ` <4D2DDA9E.4090504-/KKvz3x1pcI@public.gmane.org>
2011-01-13  2:33   ` Ned Forrester
     [not found]     ` <4D2E646E.40505-/d+BM93fTQY@public.gmane.org>
2011-01-13 16:00       ` Nicholas Kinar
     [not found]         ` <4D2F219A.1090601-/KKvz3x1pcI@public.gmane.org>
2011-01-14  4:43           ` Ned Forrester
     [not found]             ` <4D2FD480.4020001-/d+BM93fTQY@public.gmane.org>
2011-01-14  5:01               ` 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=4D2FD8B5.5090701@usask.ca \
    --to=n.kinar-/kkvz3x1pci@public.gmane.org \
    --cc=nforrester-/d+BM93fTQY@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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).