From: Jan Kiszka <jan.kiszka@domain.hid>
To: Marco Jackel <ich@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] [RTDM] best strategy for periodic reading
Date: Tue, 16 May 2006 11:37:30 +0200 [thread overview]
Message-ID: <44699D5A.9070806@domain.hid> (raw)
In-Reply-To: <e4c3bv$829$1@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1677 bytes --]
Marco Jackel wrote:
> Hello,
> I'm writing a driver for a A/D converter with a multiplexer. I want to
> access it with software controlled conversion. The controller has 15
> Inputs. I've to set a few Bits to select the Channel that I want to read
> from and to start the conversion. I want to access different channel
> with a different frequency. At the moment I try to do this with
> different realtime-tasks started from the "read_rt" function
> (rtdm_task_init).
> Is this the best way or is there something more elegant?
>
What is the usage model of your driver? Is there an application thread
associated to each frequency or even each channel? Or is there a single
reader which gets woken up once some channel finishes the conversion? Or
does the application requests a bulk of samples from multiple channels?
Depending on that usage model, an alternative way to implement your
driver is to let the application generate the conversion clock, i.e. let
it poll the data (maybe just blocking on the conversion completion).
On the other hand, if the acquisition job currently performed in
rtdm_tasks is rather light-weight, maybe timers would help you to reduce
the overhead involved in multiple threads reading from the same device
(including locking etc.). Unfortunately, an RTDM interface for direct
timer usage has not yet been fully specified. Some preliminary patch
hangs around on my box for quite a few months now. Do you see advantages
for your scenario when using timers, i.e. executing the periodic jobs
directly in the context of the timer IRQ handler? If yes, I could try to
accelerate the finalisation of this patch.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2006-05-16 9:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-16 8:43 [Xenomai-help] [RTDM] best strategy for periodic reading Marco Jackel
2006-05-16 9:37 ` Jan Kiszka [this message]
2006-05-16 10:15 ` Li Yi (Adam)
2006-05-16 10:55 ` Jan Kiszka
2006-05-16 18:56 ` [Xenomai-help] " Marco Jackel
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=44699D5A.9070806@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=ich@domain.hid \
--cc=xenomai@xenomai.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.