libusb devices with a xenomai kernel
Hi,
we have a box that is running Xenomai 2.6.1 in a amd4 cpu. We have a usb camera with a program that reads an image as fast it cans. It's executed as a normal Linux task.
We have also some tasks that use libxenomai within a realtime context. We have realized that the usb device has some kind of strange behavior and it's disconnected or simple sometimes spend too much time to acquire a image.
The question is, someone of you have experienced similar problems? or have we have to implement any special protection when we want to use a usb device (with libusb) using a Xenomai kernel?
We don't pretend to have a realtime usb, just a "similar" use that if we use the same code in a normal Linux kernel.
Thanks in advance,
Leo
Signature · 3 lines
-- Linux User 152692 Catalonia
Quoted 9 lines · Leopold Palomo-Avellaneda
Hi,
we have a box that is running Xenomai 2.6.1 in a amd4 cpu. We have a usb camera with a program that reads an image as fast it cans. It's executed as a normal Linux task.
We have also some tasks that use libxenomai within a realtime context. We have realized that the usb device has some kind of strange behavior and it's disconnected or simple sometimes spend too much time to acquire a image.
Well, it may sound stupid, but when you run a xenomai task, it has to run from time to time, so, have you check that it is not simply the real-time task interrupting the usb camera acquisition?
Quoted 7 lines
The question is, someone of you have experienced similar problems? or have we have to implement any special protection when we want to use a usb device (with libusb) using a Xenomai kernel?
We don't pretend to have a realtime usb, just a "similar" use that if we use the same code in a normal Linux kernel.
Well, when you run xenomai, there are two kernels running, one of them being a real-time kernel that is in no way designed to share the processor fairly with Linux.
If this is not your problem, Xenomai also provides the I-pipe tracer, which will allow you to trace what happens when the camera takes to long to acquire an image: simply programmatically trigger a trace freeze when this happens and go read the trace to understand what just happened.
Signature · 1 line
Gilles.