* [Xenomai] Write a hard real time usb driver
@ 2014-11-03 0:10 Seda Seda
2014-11-03 8:03 ` Jeroen Van den Keybus
0 siblings, 1 reply; 6+ messages in thread
From: Seda Seda @ 2014-11-03 0:10 UTC (permalink / raw)
To: xenomai
Hello everyone,
I try to write a hard real time usb driver. I communicate my device using
open(), read() etc. My device is a gpio module.I am coding a kernel module
to communicate the device using xenomai on real time. But I am not sure
that this way is reasonable. If I should going on this way, what should I
implement? Could you give me some example or link to write hard real time
usb driver for* physical* device? I wrote a driver for virtual device, it
was ok.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] Write a hard real time usb driver
2014-11-03 0:10 [Xenomai] Write a hard real time usb driver Seda Seda
@ 2014-11-03 8:03 ` Jeroen Van den Keybus
2014-11-03 17:12 ` Jan Kiszka
0 siblings, 1 reply; 6+ messages in thread
From: Jeroen Van den Keybus @ 2014-11-03 8:03 UTC (permalink / raw)
To: Seda Seda; +Cc: xenomai@xenomai.org
> I try to write a hard real time usb driver. I communicate my device using
> open(), read() etc. My device is a gpio module.
I assume you want to control an USB host controller using a GPIO interface ?
> I am coding a kernel module
> to communicate the device using xenomai on real time. But I am not sure
> that this way is reasonable. If I should going on this way, what should I
> implement? Could you give me some example or link to write hard real time
> usb driver for* physical* device?
I cannot help you with that, but one important issue to consider is that
the USB protocol itself operates with small, hardware controlled time slots
of 1 ms (USB1.x) or 125 usec (USB2.0). You may therefore need a significant
amount of software to properly distribute real-time traffic in these -
essentially asynchronous - slots. The latency of a real-time process
waiting for USB data can therefore also be as large as the time slot
duration. If your real-time requirements are modest, you may be able to
live with that. Still, count on a major software effort: just have a look
at the Linux USB driver framework.
Alternatively, you could check if you can synchronize your real-time
process with the USB controller frame rate.
Jeroen.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] Write a hard real time usb driver
2014-11-03 8:03 ` Jeroen Van den Keybus
@ 2014-11-03 17:12 ` Jan Kiszka
2014-11-03 17:14 ` Gilles Chanteperdrix
0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2014-11-03 17:12 UTC (permalink / raw)
To: Jeroen Van den Keybus, Seda Seda; +Cc: xenomai@xenomai.org
On 2014-11-03 09:03, Jeroen Van den Keybus wrote:
>> I try to write a hard real time usb driver. I communicate my device using
>> open(), read() etc. My device is a gpio module.
>
>
> I assume you want to control an USB host controller using a GPIO interface ?
>
>
>> I am coding a kernel module
>> to communicate the device using xenomai on real time. But I am not sure
>> that this way is reasonable. If I should going on this way, what should I
>> implement? Could you give me some example or link to write hard real time
>> usb driver for* physical* device?
>
>
> I cannot help you with that, but one important issue to consider is that
> the USB protocol itself operates with small, hardware controlled time slots
> of 1 ms (USB1.x) or 125 usec (USB2.0). You may therefore need a significant
> amount of software to properly distribute real-time traffic in these -
> essentially asynchronous - slots. The latency of a real-time process
> waiting for USB data can therefore also be as large as the time slot
> duration. If your real-time requirements are modest, you may be able to
> live with that. Still, count on a major software effort: just have a look
> at the Linux USB driver framework.
>
> Alternatively, you could check if you can synchronize your real-time
> process with the USB controller frame rate.
>
FWIW, we still don't have USB 2.0 support (though I vaguely remember
previous efforts in that direction), but at least a framework for 1.1
devices with Xenomai 2.6.x. It is in successful use for industrial
sensors. Code is available here:
http://git.kiszka.org/?p=usb4rt.git;a=summary
As the targeted sensors generate data streams only with 1 ms period, the
1.1 limitation was not an issue so far.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] Write a hard real time usb driver
2014-11-03 17:12 ` Jan Kiszka
@ 2014-11-03 17:14 ` Gilles Chanteperdrix
2014-11-03 17:22 ` Jan Kiszka
0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2014-11-03 17:14 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai@xenomai.org
On Mon, Nov 03, 2014 at 06:12:11PM +0100, Jan Kiszka wrote:
> On 2014-11-03 09:03, Jeroen Van den Keybus wrote:
> >> I try to write a hard real time usb driver. I communicate my device using
> >> open(), read() etc. My device is a gpio module.
> >
> >
> > I assume you want to control an USB host controller using a GPIO interface ?
> >
> >
> >> I am coding a kernel module
> >> to communicate the device using xenomai on real time. But I am not sure
> >> that this way is reasonable. If I should going on this way, what should I
> >> implement? Could you give me some example or link to write hard real time
> >> usb driver for* physical* device?
> >
> >
> > I cannot help you with that, but one important issue to consider is that
> > the USB protocol itself operates with small, hardware controlled time slots
> > of 1 ms (USB1.x) or 125 usec (USB2.0). You may therefore need a significant
> > amount of software to properly distribute real-time traffic in these -
> > essentially asynchronous - slots. The latency of a real-time process
> > waiting for USB data can therefore also be as large as the time slot
> > duration. If your real-time requirements are modest, you may be able to
> > live with that. Still, count on a major software effort: just have a look
> > at the Linux USB driver framework.
> >
> > Alternatively, you could check if you can synchronize your real-time
> > process with the USB controller frame rate.
> >
>
> FWIW, we still don't have USB 2.0 support (though I vaguely remember
> previous efforts in that direction),
There is one here:
http://sourceforge.net/projects/usb20rt.berlios/
Have not looked at the code though.
--
Gilles.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] Write a hard real time usb driver
2014-11-03 17:14 ` Gilles Chanteperdrix
@ 2014-11-03 17:22 ` Jan Kiszka
2014-11-03 19:30 ` Hasret Sarıyer
0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2014-11-03 17:22 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai@xenomai.org
On 2014-11-03 18:14, Gilles Chanteperdrix wrote:
> On Mon, Nov 03, 2014 at 06:12:11PM +0100, Jan Kiszka wrote:
>> On 2014-11-03 09:03, Jeroen Van den Keybus wrote:
>>>> I try to write a hard real time usb driver. I communicate my device using
>>>> open(), read() etc. My device is a gpio module.
>>>
>>>
>>> I assume you want to control an USB host controller using a GPIO interface ?
>>>
>>>
>>>> I am coding a kernel module
>>>> to communicate the device using xenomai on real time. But I am not sure
>>>> that this way is reasonable. If I should going on this way, what should I
>>>> implement? Could you give me some example or link to write hard real time
>>>> usb driver for* physical* device?
>>>
>>>
>>> I cannot help you with that, but one important issue to consider is that
>>> the USB protocol itself operates with small, hardware controlled time slots
>>> of 1 ms (USB1.x) or 125 usec (USB2.0). You may therefore need a significant
>>> amount of software to properly distribute real-time traffic in these -
>>> essentially asynchronous - slots. The latency of a real-time process
>>> waiting for USB data can therefore also be as large as the time slot
>>> duration. If your real-time requirements are modest, you may be able to
>>> live with that. Still, count on a major software effort: just have a look
>>> at the Linux USB driver framework.
>>>
>>> Alternatively, you could check if you can synchronize your real-time
>>> process with the USB controller frame rate.
>>>
>>
>> FWIW, we still don't have USB 2.0 support (though I vaguely remember
>> previous efforts in that direction),
>
> There is one here:
> http://sourceforge.net/projects/usb20rt.berlios/
>
> Have not looked at the code though.
Yeah, that's the one I recalled. Seems dead, unfortunately.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] Write a hard real time usb driver
2014-11-03 17:22 ` Jan Kiszka
@ 2014-11-03 19:30 ` Hasret Sarıyer
0 siblings, 0 replies; 6+ messages in thread
From: Hasret Sarıyer @ 2014-11-03 19:30 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai@xenomai.org
Thanks your help.
2014-11-03 19:22 GMT+02:00 Jan Kiszka <jan.kiszka@siemens.com>:
> On 2014-11-03 18:14, Gilles Chanteperdrix wrote:
> > On Mon, Nov 03, 2014 at 06:12:11PM +0100, Jan Kiszka wrote:
> >> On 2014-11-03 09:03, Jeroen Van den Keybus wrote:
> >>>> I try to write a hard real time usb driver. I communicate my device
> using
> >>>> open(), read() etc. My device is a gpio module.
> >>>
> >>>
> >>> I assume you want to control an USB host controller using a GPIO
> interface ?
> >>>
> >>>
> >>>> I am coding a kernel module
> >>>> to communicate the device using xenomai on real time. But I am not
> sure
> >>>> that this way is reasonable. If I should going on this way, what
> should I
> >>>> implement? Could you give me some example or link to write hard real
> time
> >>>> usb driver for* physical* device?
> >>>
> >>>
> >>> I cannot help you with that, but one important issue to consider is
> that
> >>> the USB protocol itself operates with small, hardware controlled time
> slots
> >>> of 1 ms (USB1.x) or 125 usec (USB2.0). You may therefore need a
> significant
> >>> amount of software to properly distribute real-time traffic in these -
> >>> essentially asynchronous - slots. The latency of a real-time process
> >>> waiting for USB data can therefore also be as large as the time slot
> >>> duration. If your real-time requirements are modest, you may be able to
> >>> live with that. Still, count on a major software effort: just have a
> look
> >>> at the Linux USB driver framework.
> >>>
> >>> Alternatively, you could check if you can synchronize your real-time
> >>> process with the USB controller frame rate.
> >>>
> >>
> >> FWIW, we still don't have USB 2.0 support (though I vaguely remember
> >> previous efforts in that direction),
> >
> > There is one here:
> > http://sourceforge.net/projects/usb20rt.berlios/
> >
> > Have not looked at the code though.
>
> Yeah, that's the one I recalled. Seems dead, unfortunately.
>
> Jan
>
> --
> Siemens AG, Corporate Technology, CT RTC ITP SES-DE
> Corporate Competence Center Embedded Linux
>
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-11-03 19:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-03 0:10 [Xenomai] Write a hard real time usb driver Seda Seda
2014-11-03 8:03 ` Jeroen Van den Keybus
2014-11-03 17:12 ` Jan Kiszka
2014-11-03 17:14 ` Gilles Chanteperdrix
2014-11-03 17:22 ` Jan Kiszka
2014-11-03 19:30 ` Hasret Sarıyer
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.