FT232H not found by FT_Prog_v3.0.56.245

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
stefani
 
Posts: 3
Joined: Mon Dec 08, 2014 9:33 am

FT232H not found by FT_Prog_v3.0.56.245

Post by stefani »

Hi,

i want fix the string descriptors and BANNED and some other parameter of the FT232H. But the windows tool FT_Prog_v3.0.56.245 is unable to find the device.

The linux tool lusb shows that iManufacturer, iProduct, iSerial are broken:

Bus 003 Device 054: ID 0403:6014 Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0403 Future Technology Devices International, Ltd
idProduct 0x6014 FT232H Single HS USB-UART/FIFO IC
bcdDevice 9.00
iManufacturer 1 (error)
can't get debug descriptor: Resource temporarily unavailable
iProduct 2 (error)
iSerial 3 (error)

Maybe this is the reason why FT_PROG will not find the device. So i ask for a fixed version of the eeprom file which i can flash with ftdi_eeprom.

Or is the FT232H not an origin one?

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: FT232H not found by FT_Prog_v3.0.56.245

Post by tdicola »

Hrm, that's odd that you can't get the manufacturer, product, and serial info. Here's an example of what I see with verbose lsusb output of the FT232H:

Code: Select all

Bus 001 Device 007: ID 0403:6014 Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0403 Future Technology Devices International, Ltd
  idProduct          0x6014 FT232H Single HS USB-UART/FIFO IC
  bcdDevice            9.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
One thing to check, to rule out a cable or port issue can you try with a different cable and on a different USB port? Let's see if that helps rules out some issue with communication between the PC and the device.

As far as programming the EEPROM goes, yeah the FT prog tool is not the greatest at dealing with errors. During board testing a script will actually use libftdi to burn a default EEPROM image to the board, but I've also used the D2XX SDK tools to erase and burn an image. Let's rule out a cable issue first and then we can look more at erasing and reburning an EEPROM with libftdi or D2XX.

User avatar
stefani
 
Posts: 3
Joined: Mon Dec 08, 2014 9:33 am

Re: FT232H not found by FT_Prog_v3.0.56.245

Post by stefani »

I checked many cables. Since the USB communication is CRC protected it is nearly impossible to get wrong data.

This is eeprom dump which i made with "ftdi_eeprom --read-eeprom".

00000000 00 00 03 04 14 60 00 09 80 32 08 00 00 00 a0 12 |.....`...2......|
00000010 b2 0e c0 12 00 00 00 00 00 00 00 00 67 00 00 00 |............g...|
00000020 12 03 41 00 64 00 61 00 66 00 72 00 75 00 69 00 |..A.d.a.f.r.u.i.|
00000030 74 00 0e 03 46 00 54 00 32 00 33 00 32 00 48 00 |t...F.T.2.3.2.H.|
00000040 12 03 46 00 54 00 52 00 41 00 4a 00 33 00 59 00 |..F.T.R.A.J.3.Y.|
00000050 32 00 02 03 00 00 00 00 00 00 00 00 00 00 00 00 |2...............|
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 79 c8 |..............y.|
00000080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00000100

The simplest way is to give me a working version of the the eeprom which i can apply with ftdi_eeprom.

BTW: I was able to fix the string descriptor issue with the latest ftdi_eeprom from libftdi 1.2, but after that the status LED is not working anymore.

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: FT232H not found by FT_Prog_v3.0.56.245

Post by tdicola »

Interesting, yeah it looks like the manufacturer, product, and serial are set to the values burned during the test. It uses manufacturer = 'Adafruit', product = 'FT232H', and serial = 'FT' + 6 random uppercase letters and digits (similar convention the FT prog tool seems to have). That's odd that lsusb isn't showing them for your for some reason.

Yeah the LED changing is likely from burning a different EEPROM image. The C8 and C9 pins are controlled by the EEPROM and burned during the test to turn the light on. I can show you how to burn the EEPROM again using the same test to have C8 and C9 driven to turn the light on again. Once we get FT prog working you can actually choose to configure C8 and C9 to make the LED show RX/TX status or a few other things (check the FT232H datasheet for the ACBUS8 and ACBUS9 EEPROM functions).

As far as an EEPROM goes we actually don't have an EEPROM image that's burned to the chip, instead some code builds and writes an EEPROM to the chip using libftdi. Attached is the test code if you want to take a look.

You probably just want to try the test_EEPROM function inside the ft232h_test.py file. The code depends on libftdi and its python wrapper being installed so make sure that's available first. Then edit runtests.py and change the tests that are run by modifying this list about halfway into the program:

Code: Select all

	tests = [ test_enumeration,
			  test_GPIO,
			  test_EEPROM ]
To just run the EEPROM test change it to:

Code: Select all

	tests = [ test_EEPROM ]
Then run either the runtest_linux.sh or runtests_macos.sh script as root, depending on your OS. This will run the runtests.py file but temporarily unload the built in FTDI serial drivers before doing so (since they conflict with libftdi). This should run the EEPROM test and burn a new image for the FT232H to it using libftdi. Give that a shot and let's see if it gets it back into a good state for you to try lsusb and FT prog again.

If it still fails after that, one other thing to try is completely erasing the EEPROM using either libftdi or the D2XX library. The chip should fall back to internal default values and FT prog should definitely be able to detect and program it at that point. I'll check which tools to use from both and reply back in a moment.
Attachments
Adafruit_FT232H_Test.zip
(6.64 KiB) Downloaded 177 times

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: FT232H not found by FT_Prog_v3.0.56.245

Post by tdicola »

To erase the EEPROM, check out the D2XX driver and the sample code it includes. Grab and install the driver & SDK from here: http://www.ftdichip.com/Drivers/D2XX.htm Then (assuming it's the Linux code) look in the release/examples/EEPROM/erase folder and make that project to verify you can build it. By default the example is actually written to use a different FTDI chip VID & PID, but you can make it erase the FT232H by changing this line from:

Code: Select all

FT_SetVIDPID(0x0403, 0x6007);
To this with the FT232H VID and PID:

Code: Select all

FT_SetVIDPID(0x0403, 0x6014);
Then compile and run it by running the erase executable as root. You might also need to manually disable the FTDI kernel drivers (like the runtest_linux.sh script does) before running the erase tool by running:

Code: Select all

sudo modprobe -r -q ftdi_sio
sudo modprobe -r -q usbserial
You can re-enable those drivers by later running:

Code: Select all

sudo modprobe -q ftdi_sio
sudo modprobe -q usbserial
Although I've noticed unplugging and replugging in the device will usually make the modules reload automatically (which is why all the code that uses the libftdi or D2XX drivers manually unload and reload those drivers every time they run).

User avatar
stefani
 
Posts: 3
Joined: Mon Dec 08, 2014 9:33 am

Re: FT232H not found by FT_Prog_v3.0.56.245

Post by stefani »

I still found a solution for the issue. Reset the hole device under linux with "ftdi_eeprom --erase-eeprom". After that FT_Prog was able to regocinze the device. I reprogrammed the device then with BANNED 500 mA, 16 mA for both Ports, C9 ist set to drive0 (make the LED go one), all other port lines are tristate.

Here is the eeprom dump of my fixed device:

00000000 10 00 03 04 14 60 00 09 80 fa 08 00 03 03 a0 12 |.....`..........|
00000010 b2 0e c0 10 00 00 00 00 00 00 00 00 60 00 56 00 |............`.V.|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000080 00 00 00 00 00 00 00 00 00 00 48 00 00 00 00 00 |..........H.....|
00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000a0 12 03 41 00 64 00 61 00 66 00 72 00 75 00 69 00 |..A.d.a.f.r.u.i.|
000000b0 74 00 0e 03 46 00 54 00 32 00 33 00 32 00 48 00 |t...F.T.2.3.2.H.|
000000c0 10 03 46 00 54 00 52 00 41 00 4a 00 33 00 59 00 |..F.T.R.A.J.3.Y.|
000000d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ef b1 |................|
00000100

The reason for power increase is that i was not able to control a mcp23s17 with the max power of 100 mA and the port power of 4 mA. I got always random results, especially reading from the mcp23s17 was a mess. And the -reset signal needs more than 4 mA to drive, so it was not possible to control this line by a port. With the new parameters everything works fine.

BTW: The old libftdi 1.0 was not able to handle the ft232 in a correct way. Support was added in later versions. I checked libftdi 1.2 which can handle the device, but there is no support in ftdi_eeprom for the lines C5-C9 and also no support the new modes of the C* lines. Maybe i will write a patch for this.

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: FT232H not found by FT_Prog_v3.0.56.245

Post by tdicola »

Oh nice, I didn't realize they released the 1.2 version a couple weeks ago. That's great, as yeah like you saw the old version's support for the FT232H was a little shakey. Great to hear it can natively erase and burn the EEPROM. I'll look at updating our test to burn the EEPROM using the newer library so hopefully it would work out of the box with FT prog. Thanks for bringing it to my attention!

User avatar
corrosion190
 
Posts: 1
Joined: Tue Feb 24, 2015 11:02 am

Re: FT232H not found by FT_Prog_v3.0.56.245

Post by corrosion190 »

I ran into the same issue.
Erasing the EEPROM fixed it.

User avatar
MorganG
 
Posts: 2
Joined: Tue Aug 04, 2015 8:55 pm

Re: FT232H not found by FT_Prog_v3.0.56.245

Post by MorganG »

Thanks for the soluiton. However, since we must erase the EEPROM before FT_PROG will recognize the part, what are the "factory settings" in the EEPROM, so that we can restore them?

User avatar
mailhouse
 
Posts: 107
Joined: Sat Jul 25, 2015 8:06 pm

Re: FT232H not found by FT_Prog_v3.0.56.245

Post by mailhouse »

MorganG wrote:Thanks for the soluiton. However, since we must erase the EEPROM before FT_PROG will recognize the part, what are the "factory settings" in the EEPROM, so that we can restore them?
Data.Signature1 = 0x00000000;
Data.Signature2 = 0xffffffff;
Data.VendorId = 0x0403;
Data.ProductId = 0x6014;
Data.Manufacturer = "Adafruit";
Data.ManufacturerId = "FT";
Data.Description = "FT232H";
Data.SerialNumber = "FTQTRXJL";
Data.BANNED = 90;
Data.PnP = 1;
Data.SelfPowered = 0;
Data.RemoteWakeup = 0;



Data.PullDownEnableH = 0;
Data.SerNumEnableH = 1;
Data.ACSlowSlewH = 0;
Data.ACSchmittInputH = 0;
Data.ACDriveCurrentH = 4;
Data.ADSlowSlewH = 0;
Data.ADSchmittInputH = 0;
Data.ADDriveCurrentH = 4;
Data.Cbus0H = 0;
Data.Cbus1H = 0;
//Data.Cbus2H = 0;
Data.Cbus3H = FT_232H_CBUS_TXLED;
//Data.Cbus3H = 0;
Data.Cbus4H = FT_232H_CBUS_RXLED;
Data.Cbus4H = 0;
Data.Cbus5H = 0;
Data.Cbus6H = 0;
Data.Cbus7H = 0;
Data.Cbus8H = 0;
Data.Cbus9H = 0;
Data.IsFifoH = 0;
Data.IsFifoTarH = 0;
Data.IsFastSerH = 0;
Data.IsFT1248H = 0;
Data.FT1248CpolH = 0;
Data.FT1248LsbH = 0;
Data.FT1248FlowControlH = 0;
Data.IsVCPH = 0;
Data.PowerSaveEnableH = 0;

User avatar
andyjuniper
 
Posts: 2
Joined: Sun Jan 10, 2016 7:08 pm

Re: FT232H not found by FT_Prog_v3.0.56.245

Post by andyjuniper »

I just had the same issue and without a Windows system to use, struggled to get things working. Took me quite a while to find this thread, initially the errors from examples/find_all ("ftdi_get_strings failed") and libusb ("LIBUSB_ERROR_TIMEOUT" -7) from the libftdi package both appeared very much like driver issues on the Ubuntu 14.04 system I'm using.

I ended up having to:
  • use "ftdi_eeprom --read-eeprom --device i:0x0403:0x6014" to dump the existing eeprom to a file
  • use ftdi_eeprom --build-eeprom --device i:0x0403:0x6014 to generate a new version
  • hex dump the eeprom files written by each of the above (see "xxd")
  • compare the two hex dumps and work out what needed changing, referring to the EEPROM-structure file in the libftdi package
  • create a fixed hex dump and convert that back to raw (see xxd -r)
  • find the undocumented "flash_raw=true" option in the ftdi_eeprom config file to tell it to just use the generated raw eeprom
  • hack ftdi_eeprom to generate the correct checksum
  • use "ftdi_eeprom --flash-eeprom --device i:0x0403:0x6014" to burn it
I think that I now have a functional device that does not upset the libusb subsystem...

I have fed the checksum generator changes back to the libftdi maintainers.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”