FT230X data corruption issue

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

FT230X data corruption issue

lokkje
Hi everybody,

I have an application that's transferring large text files to and from an FT230X.  Using the VCP driver, I've managed to transfer the files without any issues, but when I use libFTDI I'll reliably see a few hundred bytes go missing (as in, not appear in the data stream, no warning or anything) around the same place every time (within a few lines radius); the place where bytes are dropped varies by file, but certain files will reproduce it consistently.

The application runs on OSX.  I've been debugging the receive half of communications: I've put debug prints in libusb_bulk_transfer to verify it receives bad data from the OS (or at least the libusb/darwin stuff), and I've scoped the UART pins on the other side of the FTDI chip to verify it's receiving good data.  Unfortunately I don't have a USB sniffer handy to check actual USB traffic.

My standard libFTDI setup is open_desc(), followed by usb_reset() and purge_buffers(), then setting line properties and baud rate and all of that.  Getting rid of usb_reset and purge_buffers doesn't affect anything.  This happens on 1.0, and it also happens with top-of-tree (which has a few new FT230X commits it looks like, though mostly relating to eeprom and the clocking bug).

Has anybody else run into this, or does anybody have ideas for further debugging?  I tried capturing the VCP's setup sequence using OSX's instrumented usb driver, but between the limitations of instrumentation and not having great docs on the FTDI protocol I didn't get very far...

Any help appreciated!  Thanks,
Tom


libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FT230X data corruption issue

Uwe Bonnes
>>>>> "lokkje" == lokkje  <[hidden email]> writes:

    lokkje> Hi everybody, I have an application that's transferring large
    lokkje> text files to and from an FT230X.  Using the VCP driver, I've
    lokkje> managed to transfer the files without any issues, but when I use
    lokkje> libFTDI I'll reliably see a few hundred bytes go missing (as in,
    lokkje> not appear in the data stream, no warning or anything) around
    lokkje> the same place every time (within a few lines radius); the place
    lokkje> where bytes are dropped varies by file, but certain files will
    lokkje> reproduce it consistently.

    lokkje> The application runs on OSX.  I've been debugging the receive
    lokkje> half of communications: I've put debug prints in
    lokkje> libusb_bulk_transfer to verify it receives bad data from the OS
    lokkje> (or at least the libusb/darwin stuff), and I've scoped the UART
    lokkje> pins on the other side of the FTDI chip to verify it's receiving
    lokkje> good data.  Unfortunately I don't have a USB sniffer handy to
    lokkje> check actual USB traffic.

    lokkje> My standard libFTDI setup is open_desc(), followed by
    lokkje> usb_reset() and purge_buffers(), then setting line properties
    lokkje> and baud rate and all of that.   Getting rid of usb_reset and
    lokkje> purge_buffers doesn't affect anything.  This happens on 1.0, and
    lokkje> it also happens with top-of-tree (which has a few new FT230X
    lokkje> commits it looks like, though mostly relating to eeprom and the
    lokkje> clocking bug).

    lokkje> Has anybody else run into this, or does anybody have ideas for
    lokkje> further debugging?  I tried capturing the VCP's setup sequence
    lokkje> using OSX's instrumented usb driver, but between the limitations
    lokkje> of instrumentation and not having great docs on the FTDI
    lokkje> protocol I didn't get very far...

Can you try to reproduce with RX-TX of a FT230 connected and a libftdi
Test program you post here? I have FT230 devices and I could try to
debug. However I will be away most of the next week ...

Bye

--
Uwe Bonnes                [hidden email]

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]

Loading...