Hello All,

I am developing a software application that depends on a signal acquisition card that periodically samples a analog signal. The data acquisition card is build in house and is using a FTDI 245 BM FIFO USB chip. The data rate is about 640 k bps and the FTDI chip has a buffer for only about 4 ms worth of data.

I noticed that some of the USB transfers are incomplete. The controller that acquires data tries to send a package to the FIFO queue on the USB chip and the queue fills so part of the packet gets lost. After this incomplete packet are are lost due to the fact that the FIFO buffer doesn't get emptied until some 5-10 ms later.

We are using a FTDI provided library and also libftdi for reading data from the device. What I have noticed is that both those libraries do bulk transfer and operate in user space.

1. Is it possible to guarantee for a user space application (that is using libusb) a query rate of 500 queries per second (once every 2-3 ms) even if the overall load of the system is high(other pretty intensive computations happen in the background). This should prove to be enough given the dimensions of buffers involved.

2. To my knowledge, the USB bulk transfer is user initiated so the query rate is dependent on the ability of the user to submit the requests fast enough to the kernel. The other type of transfer is interrupt transfer and this occurs periodically and is scheduled by the kernel. Can this type of transfer be used in my current situation or the transfer mode is controlled by the actual hardware device (if the FTDI chip does bulk transfers then only those type of transfers work)?

3. Would it be better if I develop a kernel mode application (a module) to handle the communication. If I run at the kernel level would I be able to keep the pace with the incoming data stream?

I am using a Debian Linux on an Pentium Centrino @ 1.2 G Hz with 512 MB RAM. The system is a dedicated one so it has only the minimum hardware and software (no X, no web, file or database server).

This is my first post to this forum and I have little to none understanding of USB and how is it implemented in Linux. If you can send me some documentation that would help me to understand how the USB support is implemented, it would be appreciated.

Thank you very much.

Best regards,
--
Emil Mieilica
Software Developer
Office and mailing : Calea Bucuresti no 3A,
Otopeni, Ilfov, Romania
Tel: +40 21 266 41 42
Fax: +40 21 266 40 53
E-mail:
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Web: http://www.mbtelecom.com


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to