* [Xenomai-help] Calling comedi from a RT task
@ 2008-12-02 8:01 Patrick Gräbel
2008-12-02 17:12 ` Jan Kiszka
0 siblings, 1 reply; 5+ messages in thread
From: Patrick Gräbel @ 2008-12-02 8:01 UTC (permalink / raw)
To: xenomai
Hi,
I am using Xenomai 2.3.1 and comedi with driver "ni_pcimio". I am able
to create a RT task that triggers each msec. But calling the comedi API
kicks me out of RT as indicated by /proc/xenomai/stat (column MSW). The
modules loaded are:
comedi_fc 3584 1 ni_pcimio
kcomedilib 20868 0
comedi 33248 6 ni_pcimio, ni_tio, comedi_fc, mite, 8255, kcomedilib
licModule 44272 1 kcomedilib
The comedi modules are from a 2.6.20-14-ipipe/comedi/driver directory.
How do I use the comedi API so that the task will stay realtime? What do
I have to check?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-help] Calling comedi from a RT task
2008-12-02 8:01 [Xenomai-help] Calling comedi from a RT task Patrick Gräbel
@ 2008-12-02 17:12 ` Jan Kiszka
2008-12-03 23:55 ` Alexis Berlemont
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2008-12-02 17:12 UTC (permalink / raw)
To: Patrick Gräbel; +Cc: xenomai
Patrick Gräbel wrote:
> Hi,
>
> I am using Xenomai 2.3.1 and comedi with driver "ni_pcimio". I am able
> to create a RT task that triggers each msec. But calling the comedi API
> kicks me out of RT as indicated by /proc/xenomai/stat (column MSW). The
> modules loaded are:
>
> comedi_fc 3584 1 ni_pcimio
> kcomedilib 20868 0
> comedi 33248 6 ni_pcimio, ni_tio, comedi_fc, mite, 8255, kcomedilib
> licModule 44272 1 kcomedilib
>
> The comedi modules are from a 2.6.20-14-ipipe/comedi/driver directory.
> How do I use the comedi API so that the task will stay realtime? What do
> I have to check?
You should have a look at the RT-capable comedi stack that currently
only lives in Xenomai SVN trunk. How to get your device supported by
that stack, ie. how to port the existing driver to RT-comedi, that's
something Alexis can tell you more about. And/or have a look at the fake
and loop drivers that are already included.
Jan
--
Siemens AG, Corporate Technology, CT SE 2 ES-OS
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-help] Calling comedi from a RT task
2008-12-02 17:12 ` Jan Kiszka
@ 2008-12-03 23:55 ` Alexis Berlemont
2008-12-04 9:38 ` Patrick Gräbel
0 siblings, 1 reply; 5+ messages in thread
From: Alexis Berlemont @ 2008-12-03 23:55 UTC (permalink / raw)
To: xenomai
Hi,
> >
> > I am using Xenomai 2.3.1 and comedi with driver "ni_pcimio". I am able
> > to create a RT task that triggers each msec. But calling the comedi API
> > kicks me out of RT as indicated by /proc/xenomai/stat (column MSW). The
> > modules loaded are:
> >
> > comedi_fc 3584 1 ni_pcimio
> > kcomedilib 20868 0
> > comedi 33248 6 ni_pcimio, ni_tio, comedi_fc, mite, 8255, kcomedilib
> > licModule 44272 1 kcomedilib
> >
> > The comedi modules are from a 2.6.20-14-ipipe/comedi/driver directory.
> > How do I use the comedi API so that the task will stay realtime? What do
> > I have to check?
>
> You should have a look at the RT-capable comedi stack that currently
> only lives in Xenomai SVN trunk. How to get your device supported by
> that stack, ie. how to port the existing driver to RT-comedi, that's
> something Alexis can tell you more about.
If you consider porting the ni_pcimio driver to the RTDM version of Comedi,
please tell me; I am trying to do the same thing. You could save my time or I
could save yours ;). Anyway, your help would be very valuable as I have no
acquisition card...
> And/or have a look at the fake
> and loop drivers that are already included.
You can also have a look at the doxygen documentation available in the SVN
trunk. The section "Comedi API -> Driver API" (driverfacilities) should help
you.
> Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-help] Calling comedi from a RT task
2008-12-03 23:55 ` Alexis Berlemont
@ 2008-12-04 9:38 ` Patrick Gräbel
2008-12-04 23:57 ` Alexis Berlemont
0 siblings, 1 reply; 5+ messages in thread
From: Patrick Gräbel @ 2008-12-04 9:38 UTC (permalink / raw)
To: xenomai
Hi!
At the moment I have not much time to look into the APIs, but we have
some cards to test with: NI 6220, Adv 1751 and Adv 1720 (and maybe
more). Of course I would test drivers for you, if there are any prototypes.
What's the effort on porting? Is there much to do or do I have to
programm a driver from scratch? How do I have to imagine the structure
of the whole project?
Xenomai ------------> Comedi API -> driver (e. g. ni_pcimio)
|
---> RTDM --> Comedi RT API (part of Xenomai) -> RT driver
Is the Comedi API that is part of the Xenomai hierachy a Real Time
substitute for the Comedi API of the original Comedi project? So porting
is only a litte more than a simple recompile?
Is this correct? I would welcome any comments on this.
Greetings
Patrick Graebel
--
Universität Kassel
Fachbereich Elektrotechnik/Informatik
Fachgebiet Fahrzeugsysteme und Grundlagen der Elektrotechnik
Wilhelmshöher Allee 73
34121 Kassel
E-Mail: graebel@domain.hid, Telefon: 0561 804-6264
GnuPG Fingerprint: 65B0 6282 5934 E2DC ADEB 6C2C CCEE 55FA 2C63 4E5C
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-help] Calling comedi from a RT task
2008-12-04 9:38 ` Patrick Gräbel
@ 2008-12-04 23:57 ` Alexis Berlemont
0 siblings, 0 replies; 5+ messages in thread
From: Alexis Berlemont @ 2008-12-04 23:57 UTC (permalink / raw)
To: xenomai
Hi,
>
> At the moment I have not much time to look into the APIs, but we have
> some cards to test with: NI 6220, Adv 1751 and Adv 1720 (and maybe
> more). Of course I would test drivers for you, if there are any prototypes.
>
> What's the effort on porting? Is there much to do or do I have to
> programm a driver from scratch? How do I have to imagine the structure
> of the whole project?
The principles remain the same (subdevices, channels, ranges, commands,
instructions, etc.). However, there are some differences in both APIs:
- the driver API has evolved a little bit (subdevice registration and
asynchronous buffer access);
- the comedilib API has been reworked, the comedilib features range has been
gathered into a smaller set of functions.
Consequently, integrating a driver from the original comedi framework into
Xenomai's Comedi implies some slight modifications in the driver source.
However, the whole module should not be rewritten.
And, converting your current program(s) into full RT application(s) is not a
difficult task. You will have to update the Comedi functions calls.
Ex.:
- comedi_data_read(), comedi_data_read_hint(), comedi_data_read_delayed()
become comedi_sync_read()
- comedi_dio_read(), etc. => comedi_sync_read() too
- etc.
> Xenomai ------------> Comedi API -> driver (e. g. ni_pcimio)
>
> ---> RTDM --> Comedi RT API (part of Xenomai) -> RT driver
On kernel side:
Xenomai nucleus <- RTDM skin <- comedi layer <- comedi driver
On user side:
RTDM user skin (Xeno syscalls) <- Comedilib library <- your user process
> Is the Comedi API that is part of the Xenomai hierachy a Real Time
> substitute for the Comedi API of the original Comedi project? So porting
> is only a litte more than a simple recompile?
The comedi API available in Xenomai is not just a real-time substitute. The
new comedi core fully relies on RTDM services; then, even an NRT task can use
the new comedi framework.
> Is this correct? I would welcome any comments on this.
>
Alexis.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-12-04 23:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-02 8:01 [Xenomai-help] Calling comedi from a RT task Patrick Gräbel
2008-12-02 17:12 ` Jan Kiszka
2008-12-03 23:55 ` Alexis Berlemont
2008-12-04 9:38 ` Patrick Gräbel
2008-12-04 23:57 ` Alexis Berlemont
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.