Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Marten Svanfeldt <marten.svanfeldt@gmail.com>
Cc: "Hennerich, Michael" <Michael.Hennerich@analog.com>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: High frequency software trigger
Date: Fri, 04 Mar 2011 11:10:34 +0000	[thread overview]
Message-ID: <4D70C8AA.4090300@cam.ac.uk> (raw)
In-Reply-To: <4D70BFCD.40605@gmail.com>

Hi Marten,
>> I recently submitted a trigger source driver that utilizes Blackfin hardware timer.
>>
>> http://wiki.analog.com/software/linux/docs/iio/iio-trig-bfin-timer
> 
> Thank you, this had passed me by. Looking at the source, it seems
> that a hrtimer based trigger would be something similar, except not
> tied to any specific platform.
Agreed.  The rtc trigger is a silly historical relic from the pxa platform I use
which does do higher frequency periodic rtc tics.  I also have a driver for that
which effectively does the same as Michaels blackfin one, but via the rtc
interface (gives me 7 additional rtcs).

A generic hrtimer approach is something I've thought about from time to time
but never gotten round to actually writing!  Hence I'd certainly be interested
in your generic driver.
>>
>> Not sure what your platform is, but there might be similar peripherals,
>> that can generate sub second cyclic interrupts.
> The platform in question is an TI OMAP3 (3530) based system, but my
> goal would be to utilize hrtimers as they are not tied to a specific
> platform. They are supposed to work on our target platform, but I
> haven't had time to test them extensively yet.
The advantage of using specific timers originally was the simplicity of setting them
up. They look very much like an interrupt coming off the sensor hence can be set up
then left alone.
>
>> I successfully used it on a fast Blackfin processor at frequencies of 10kHz and above,
>> with this simple demo application.
>>
>> http://wiki.analog.com/software/linux/docs/iio/iio_netscope
> 10kHz sounds reassuring, in my case it is about 250Hz max, but some
> 13 or so channels. Did you get any idea where the limitations lies in
> terms of system load etc? Of course this depends on the exact setup,
> just trying to find all possible sides of moving our code over to be
> IIO-based.
I'm quite happily doing 4 channels off the periodic rtc at 1Khz on a pxa271.
Things got a bit choppy in timing when we went to 2Khz but it works well enough.
The uneven timing had definite spikes so I suspect other things were hogging
the processor from time to time.  I should probably revisit these tests and see
if I can pin down exactly what is causing the issue (that was about 2 years ago
so it may well have gone away!)  

I'm only superficially familiar with the abilities of hrtimers.
Perhaps you could post your current code as an RFC so we can get an idea of exactly
how this would work?

Thanks,

Jonathan



  reply	other threads:[~2011-03-04 11:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-04  7:26 High frequency software trigger Marten Svanfeldt
2011-03-04  9:19 ` Hennerich, Michael
2011-03-04 10:32   ` Marten Svanfeldt
2011-03-04 11:10     ` Jonathan Cameron [this message]
2011-03-07  5:49       ` Marten Svanfeldt
2011-03-09 14:00       ` [RFC] IIO: trigger: New hrtimer based trigger driver Marten Svanfeldt
2011-03-09 14:00       ` [PATCH] " Marten Svanfeldt
2011-03-09 19:31         ` Jonathan Cameron
2011-03-10  2:19           ` Marten Svanfeldt

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=4D70C8AA.4090300@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=Michael.Hennerich@analog.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=marten.svanfeldt@gmail.com \
    /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