Author Topic: Using D2XX and VCP with FT2232H at the same time?  (Read 109 times)

0 Members and 1 Guest are viewing this topic.

Offline BoscoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 279
Using D2XX and VCP with FT2232H at the same time?
« on: Yesterday at 08:53:13 am »
Hi all,

I'd like some advice on my project. I have an FT2232H with port A connected to an FPGA for 245 sync operation and port B as an RS232 interface for communicating with and programming an ESP32. Port A have been preconfigured in the EEPROM for the sync mode using the D2XX driver and port B as RS232 and VCP. Both interfaces work perfectly well independently however when I connect to and configure port A using the D2XX driver, port B stops working with no communication and it's not possible to program the ESP32 unless I power cycle the FT2232H putting it back into the EEPROM configuration. When I do configure and use port A using D2XX this works as expected.

Does anyone have any experience doing this kind of thing? I have tested this setup on MacOS and Ubuntu with the same results. I'm confident I'm configuring the correct port otherwise I wouldn't get any data from the FPGA. Below is my init code.

Thanks!

Code: [Select]
dev_serial = "SE9AJ5P8A"

print(f"Connecting to {dev_serial}")

dev = ftd2xx.openEx(dev_serial.encode(), ftd2xx.defines.OPEN_BY_SERIAL_NUMBER)
time.sleep(0.1)
dev.setTimeouts(10, 10)
time.sleep(0.1)
dev.setBitMode(0xFF, 0x00)
time.sleep(0.1)
dev.setBitMode(0xFF, 0x40)
time.sleep(0.1)
dev.setUSBParameters(0x10000, 0x10000)
time.sleep(0.1)
dev.setLatencyTimer(2)
time.sleep(0.1)
dev.setFlowControl(ftd2xx.defines.FLOW_RTS_CTS, 0, 0)
time.sleep(0.1)
dev.purge(ftd2xx.defines.PURGE_RX)
time.sleep(0.1)
dev.purge(ftd2xx.defines.PURGE_TX)
time.sleep(0.1)
 

Offline laminarlade

  • Newbie
  • Posts: 1
  • Country: de
Re: Using D2XX and VCP with FT2232H at the same time?
« Reply #1 on: Yesterday at 11:30:49 am »
Hi Boscoe,

AFAIK on Mac and Linux D2XX and VCP are 'mutual exclusive', see https://ftdichip.com/wp-content/uploads/2020/08/D2XX_Programmers_GuideFT_000071.pdf cap. 2.

But you can try the open source libftdi/pylibftdi combo on Ubuntu.
 

Offline BoscoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 279
Re: Using D2XX and VCP with FT2232H at the same time?
« Reply #2 on: Yesterday at 12:15:07 pm »
Thanks!

I just found that the FT2232H cannot support any other interfaces when sync mode is used  :palm:
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf