October 6, 2010

Undocumented FTDI error conditions

Filed under: Uncategorized — NefMoto @ 10:07 am

I thought I would let all of you know that I spent a couple weeks pulling my hair out, trying to figure out some strange FTDI bugs. I finally got around to rewiring my ECU bench harness, and creating a new power supply for it. Then right after doing that, I started getting FT_IO_ERROR return codes when trying to read message echos, after sending transfer data messages during flash programming.

I couldn’t figure it out for the life of me, and thought it must be related to my new wiring harness or power supply. After doing lots of testing, I thought it may be caused by my new power supply not providing enough voltage or amperage, until it also started happening in my car as well. I did a lot more Googling at this point and came up with no clear answers.

It turns out my problem was caused by using the function FT_SetUSBParameters to set too small of a USB receive buffer (64 bytes) when trying to read and write blocks of about 300 bytes. It appears this causes a condition where the FTDI driver’s internal USB buffer is too small to complete my read and write requests. This situation is not documented by FTDI, so I wanted to make sure to mention it here in case someone else runs into this.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.



Powered by WordPress