libftdi Archives

Subject: Re: More FT2232H USB->serial woes

From: "Gerd v. Egidy" <gerd.von.egidy@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx, "T. Horsnell" <tsh@xxxxxxxxxxxxxxxxx>
Date: Tue, 22 Dec 2009 15:41:05 +0100
Hi,

> > Instead, it just loops in the ftdi_read_data loop until I
> > re-plug the mini-module. Then it works just once again, and
> > loops thereafter. And so on..
> 
> So basically the ftdi_write_data() call gets lost
> the second time you run the program?

Did you try to restart your program instead of re-plugging your module?

> We had a "first ftdi_write_data()" call gets lost problem
> in the past and might still have it. My colleague tried
> to trace it down as it doesn't seem to happen when using
> the closed source D2XX drivers. IIRC the last status
> was that it might be timing related, maybe he can
> comment on the issue.

I tried to trace it down and then it vanished without any change I am aware 
of. I'm currently not able to reproduce it anymore :( 
Maybe it's the room temperature which is now lower than back in summer...

When I still had it, I compared the usb urbs with usbmon to D2XX. The messages 
are basically the same but D2XX is very talkative in it's background thread. 
And it's beginning to send much later (IIRC, about half a second) than 
libftdi. So maybe there is some wait required after changing the mode or 
baudrate.

Try to insert a sleep of a second after changing mode and baudrate, before 
sending any data. Does that help?

Kind regards,

Gerd

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread