Advice for a newbie on Xenomai & USB
Hello,
I am a PhD student at the Technical University of Catalonia. I work on UAV helicopters. It is a new field in my research group so I need to develop the rig before start working on Identification and Control Theory (which is supposed to be THE topic of the Thesis).
We chose to use en embedded PC as 'brain'. The readings of the system come from an IMU and the actuators (R/C servos) are commanded by a microcontroller (already programmed and working). Both devices Tx/Rx input/output data with the computer through TTL USART converted to USB.
The PC is an Intel Atom Z520, on a chipset ..., with 1GB of RAM and booting on a high-speed Compact Flash.
On the first stage of the software, a human is choosing the microcontroller inputs (that is: piloting the craft), and the computer 'only' needs to gather the input to the microcontroller and the output from the IMU and write it to disk with due time stamps. 10Hz would be OK, 100Hz would be the goal.
On the second stage, the computer will have to gather the output data, compute the control input and send it to the microcontroller. On hard real time at (>10 to 100) Hz, of course.
As you may guess, I chose Xenomai to make sure time requirements are respected. It would run on a command-line Ubuntu 9.04. The programming would be developed for C++ (compiled with g++).
As a totally newbie on Xenomai and only average user on Ubuntu-Linux, I would need some community guidance to get my feet wet.
As you already know my specifications, do you think the computing system is suited for the needs? As the computer does not have embedded USART modules, I rely on USB to TTL USART converters (ttyUSBx). Are there any suitable drivers for Xenomai? USB4RT? With interruptions and configuration for SSP? Where do you guess the bottlenecks will be? Is there any detailed guide for newbies? Could you suggest me any documentation on PC architecture and/or Linux OS to fully understand the system? I have mainly programmed microcontrollers, on which I would make use of interruptions and input/output modules all the time, and I need to port it to PC, for which I have never used interruptions nor used the input/output modules' drivers deeply nor write them.
Any suggestions would be very useful.
Thanks for your help.
Best regards,
David Lavèrnia
Dear David,
Quoted 6 lines · In message <[email protected]> you wrote:
As you already know my specifications, do you think the computing system is suited for the needs? As the computer does not have embedded USART modules, I rely on USB to TTL USART converters (ttyUSBx). Are there any suitable drivers for Xenomai? USB4RT? With interruptions and configuration for SSP?
Could you use a PCI or PCIe card with standard 16550 UARTs instead?
I recommend to get USB out of the link here.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] You cannot propel yourself forward by patting yourself on the back.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Dear David,
Quoted 2 lines · In message <[email protected]> you wrote:
What happens if I cannot get USB out of the loop? Is it doomed?
Well, in my experience (> 10 years of embedded Linux) USB has an unchallenged number one position on the list of candiates for causing problems in embedded projects - without any real-time requirements.
If you cannot get rid of it, then I recomment to run thorough tests as early as possible.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] Experience is what causes a person to make new mistakes instead of old ones.
Dear Wolfgang,
What steps would you recommend me to follow that arduous path? What drivers, manuals, guides, books would you suggest to get started?
The PC I'm using, in addition to the 6 USB's, it also has Wlan, Lan, mini-SD, and IrDA. Do you think it would be better to use those modules to Rx/Tx info?
Thanks for your help.
Best regards,
David
Quoted 19 lines · Wolfgang Denk
Dear David,
Quoted 2 lines · In message <[email protected]> you wrote:
What happens if I cannot get USB out of the loop? Is it doomed?
Well, in my experience (> 10 years of embedded Linux) USB has an unchallenged number one position on the list of candiates for causing problems in embedded projects - without any real-time requirements.
If you cannot get rid of it, then I recomment to run thorough tests as early as possible.
Best regards,
Wolfgang Denk
Dear David,
Quoted 7 lines · In message <[email protected]> you wrote:
What steps would you recommend me to follow that arduous path? What drivers, manuals, guides, books would you suggest to get started?
The PC I'm using, in addition to the 6 USB's, it also has Wlan, Lan, mini-SD, and IrDA. Do you think it would be better to use those modules to Rx/Tx info?
Well, using RTNet on your LAN interface is probably a lot easier and definitely more reliable than a serial link over USB...
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] Never underestimate the bandwidth of a station wagon full of tapes. -- Dr. Warren Jackson, Director, UTCS