Configuring FT2232H USB Serial converter on Saturn Spartan 6 Module

March 14, 2016

Saturn Spartan 6 FPGA module has an onboard FT2232H USB to serial device for easy communication with the host. FT2232H has two channels and are usually called Channel A and Channel B. These channels are separate USB multiprotocol engines which can independently act as separate serial ports or other protocol converters. Besides RS232 style serial interface, FT2232H supports I2C, SPI, JTAG etc..

Channel A of the FT2232H on Saturn Spartan 6 FPGA Module is dedicated for SPI flash programming. This way, your design can be downloaded to the board without using a dedicated JTAG cable. Since the design is written directly to the on board SPI flash, it will stay persistent even after a power cycle. The configuration tool does not support programming FPGA SRAM directly at this time.

Channel B of the FT2232H is connected to the FPGA through a few dedicated IOs. This allows the FPGA to communicate with host PC easily and efficiently. The link between the FPGA and FT2232H is 13 bits wide. This helps implement any of the following protocols for FPGA <-> FT2232H communication.

  • RS232 style serial
  • Synchronous 245 style FIFO
  • Asynchronous 245 style FIFO
  • SPI
  • I2C
  • JTAG
  • And more using bit bang interface

Since Channel A is dedicated for SPI programming, it is not advisable to change the default configuration on that channel. But Channel B can be configured as per your needs. This short tutorial will walk you through the basics of configuring FT2232H using FT_Prog utility. Please download and install FT_Prog utility form here.

Before we can start working on the FT2232H device we will need to scan the system, list all FTDI devices and identify the device that belongs to Saturn. To do this, run the utility, click on the magnifier icon on the tool bar. If Saturn is connected to the PC, it should be listed in the Device Tree on the left side of the window. If there are more than one device listed, click on each device and find the one with product description “Saturn Spartan 6 FPGA module” as shown in the image below.

ft_prog_11

At this point we can configure Channel B. The only thing that you may need to change here is the kind of driver that is being used for that channel. As you can see in the image below, FT2232H can be operated with two different types of drivers, Virtual COM port and D2XX. VCP driver will make FT2232H look like a standard serial port when connected to PC an you can use a serial terminal emulator program such as Teraterm or HyperTerminal to communicate with the device. This is very helpful when debugging your design or running an operating system such as Linux on Saturn. This serial port can work as a console interface in such cases. But the disadvantage is that you can use only RS232 style serial interface for communication between FT2232H and the FPGA and this is relatively slower form of communication.

To use any other protocol, the channel needs to be configured to use D2XX driver. Once the channel is configured to use D2XX, it can be accessed by using D2XX API provided by FTDI as described in D2XX Programmer’s Guide. The fastest communication option would be to use 245FIFO. This interface uses 8 data lines and a couple of control lines to move data between FT2232H and the FPGA. Please see FTDI’s documentation for more details about using 245FIFO mode. The image below shows how to select between VCP and D2XX modes.

ft_prog_21

Once the appropriate driver is selected, program the new configuration to the device by clicking the small thunderbolt icon on the toolbar. You can save the existing configuration to an XML file by clicking the save button on the tool bar. It is highly recommended that you backup existing configuration first before making any changes.

Was this helpful?

2 Comments
  • Verne Stauffer says:

    configuring channel B for virtual com port use it states the driver is to be changed to VCP but it does not state the hardware selection. What is the correct hardware selection that goes with virtual com port use /teraterm?

    August 11, 2016 at 3:33 pm
    • admin says:

      Hi Verne,

      No hardware change is necessary to switch between parallel and serial (VCP) interface. All signals necessary for both interfaces (on Channel B) are directly connected to FPGA. Please see the user manual/schematics for connection details.

      Thanks,
      Tom
      Numato Lab

      August 16, 2016 at 11:36 pm

Leave A Comment

*
*