Quick questions:
1. What is the problem with "xntimer_init()"? The timerbench.c use it to create timers? You are going to write a RTDM implementation?
2. What is general program model for Xenomai application like data acquisition? What I am thinking is to start the RT task in user space (via POSIX skin), and implement the read funtion in kernel space using RTDM.
Thanks,
-Yi
On 5/16/06, Jan Kiszka <[EMAIL PROTECTED]> wrote:
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
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help
_______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
