From: Sylvain [Bibi] <bi...@cr...> - 2007-06-28 10:43:55
|
Hi, I'm trying to develop a FPGA-based system which is analog to an audio acquisition card for some real time applications. The system is connected to a Macbook (or a PC if needed) through a FTDI chip. So I'm using the libftdi (and libusb) to send and receive data from the USB. The acquisition card must send every 67uS (15kHz sampling frequency) about 22 bytes to the host. So, the data rate is about 330 kB/s, which seems correct for USB. But the problem is that sometimes there are some latencies, lasting sometimes about 200ms (!), which stop all the FTDI/host transfers. I have added a 65kB buffer in the FPGA to store the real-time data when the communication is stopped, but the buffer randomly overflows and I lost some values ... I'm clearly new to the USB coding, and I suppose that such latencies are "normal". But is there a way to reduce them ? Do you have some suggestions or solutions which could help me to avoid such data loss ? Thanks for any advice. -- Sylvain |