ftdi-rs/libftd2xx

Frequent transactions can result in USB timeout.

newAM opened this issue · 6 comments

newAM commented

Seen only on Linux so far.

Minimally reproducible by rapidly toggling GPIOs in ftd2xx-embedded-hal.

newAM commented

Empirical testing shows that adding a 64ms delay between write calls alleviates the issue. Unable to reproduce at all on Windows.

This appears to be a bug in the closed-source vendor driver.

Which version of the driver was this issue testet with?
I see this in the changelog.

1.4.22
Improve response time to fast back-to-back FT_Read operations when data is
available and buffered. Improve on fix introduced in 1.4.20.

1.4.20
Fix issue with possible timeout occurring when reading fast bursts of data.

Don't know if it's related.

newAM commented

...that is likely the issue, excellent!

The current version is the previous release 1.4.8 (it appears 1.4.10, 1.4.16, 1.4.20 were not released).

I will update the vendor library in libftd2xx-ffi-rs.

Yay awesome!
Investigated when u mentioned in the I2C example issue u lost interest because of it, even tho I don't use Linux myself, because I really appreciate the work done here.

Currently porting some C# I2C code I'm toying with at work to rust to try and get better at it.

newAM commented

It is merged into main now, 9bec107.

I am going to hold off on a release for a bit. Basic checks pass, but I want to try it out for a bit longer before I push a release. Release end of next weekend at the latest.

newAM commented

Should be fixed in 0.25.0, I was unable to reproduce the issue with the updated vendor library.