General Category > Discussion - Drivers

FT_Write returning FT_OK but BytesWritten is 0

<< < (2/3) > >>

FTDI Community:
Hello,

What are the differences between the old and new CPU models?

The hub is part of the issue, you have mentioned resetting clears the problem.

Please test with our know good hardware. Links to these are in the previous post.

Best Regards,
FTDI Community

liquidair:
Any update on this? I too am having a similar problem with the FT201X where the C# version of FT_Write will return FT_OK but nothing is written. In my case, BytesWritten gives the correct value, however. When you try to read this data via i2c the chip returns 0, as does using the 'Read Data Available" command. Been stuck for a month now.

FTDI Community:
Hello liquidair,

The original posts seem slightly different to your issue.

Which C# wrapper are you using? Are you using custom hardware?
This is not a common issue with FT201X I2C slave.

Have you referred to AN_255 USB to I2C Example Using the FT232H and FT201x Devices for examples on how to use FT201X?
The code can be downloaded here.

The I2C routines involve using standard D2xx functions to send buffers of commands and read bytes back from the FT232H. The routines can therefore be ported over to any other operating systems which support the D2xx drivers. Likewise, the routines can be used in other languages such as Visual Basic and C# by modifying them to use the correct syntax for the required language.

Best Regards,
FTDI Community

gabriel.au:
Sorry, I ended up resolving this but never posted the final results.

It turned out to be a problem with the hub IC.  It was built into the CPU SOC and it would randomly lower the output voltage of the D+/D- signals sometimes so that the FTDI couldn't discern the signal.  We never got the vendor to admit why.  We eventually got a work around in the bios by changing the hub from xHCI to EHCI Controller.  The hub had USB 3.0 ports which we weren't using and I think they were confusing the 2.0 ports by trying to negotiate sometimes?  Not sure.  By using the EHCI controller it forced the USB 3.0 ports off and the problem went away.

liquidair:
Thank you gabriel.au! I'm definitely not having the same issue based on your response!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version