FTDI Community

General Category => Discussion - Software => Topic started by: kiran on March 08, 2024, 10:58:42 AM

Title: FT2232hpq
Post by: kiran on March 08, 2024, 10:58:42 AM
We are using FT2232hpq module  and We are using "MPSSE" mode(SPI) and is it possible to operate the GPIO0(56-pin),GPIO1(55-pin),GPIO2(54-pin)  and  GPIO3 (5-pin) pins in software.
Title: Re: FT2232hpq
Post by: FTDI Community on April 10, 2024, 10:20:45 AM
Hello,

When using LibMPSSE, GPIOL[0:3] can only be used as SPI chip selects.
 
When using LibMPSSE, there is no way to control GPIOL[0:3] as GPIO.
 
LibMPSSE demonstrates controlling the higher line bytes (GPIOH) while using SPI on the lower line bytes using the following functions:
 
FT_WriteGPIO
FT_ReadGPIO
 
If you want to control some of the unused lower line bytes on the same ADBUS as SPI then see AN_411 FTx232H MPSSE I2C Master Example in C which demonstrates GPIO usage with MPSSE using D2xx direct (not using LibMPSSE).
This could be used as a base to understand using both SPI/GPIO in the same code.
OK this example is for I2C but the same principles apply to SPI.

Best Regards
FTDI Community