FTDI Community

General Category => Discussion - Hardware => Topic started by: igget76 on March 25, 2022, 01:28:58 PM

Title: FT4232H What controls the PWREN# pin
Post by: igget76 on March 25, 2022, 01:28:58 PM
We are using a FT4232H USB to serial bridge in one of out boards. We are using it in MPSSE mode. We would like to let some logic drive switches to disconnect the I2C and SPI buses connected to the FT4232H when the device is not in use.

I see that the PWREN# pin may be used for this purpose. As I can see from the datasheet and application notes, the PWREN# pin is low when the device has been configured by the USB host.
What exactly does it mean that the device has been configured? Does it mean that power has been enabled and no command has been sent over USB? Is it the time between power-on/reset and the initial USB communication or configuration commands? As i understand the device will start up in UART mode. Is this state considered to be configured?
Anyone have some insight into the distinctions here?

I see that the pin changes state in USB suspend mode. This is not so interesting for this application. I would like PWREN# to go low when MPSSE mode has been initiated.
Title: Re: FT4232H What controls the PWREN# pin
Post by: FTDI Community on March 28, 2022, 04:44:19 PM
Hello,

PWREN# will go low when the device is enumerated by the Host and it may change state is the device goes into suspend mode.

As you are looking for functionality to toggle when MPSSE mode has been initiated, you could consider using one of the I/O pins as GPIO in MPSSE mode. So your software could toggle a pin after you enter MPSSE mode.

See AN_411 FTx232H MPSSE I2C Master Example in C (https://ftdichip.com/wp-content/uploads/2020/08/AN_411_FTx232H-MPSSE-I2C-Master-Example-in-Csharp.pdf) which demonstrates GPIO usage with MPSSE (not using LibMPSSE).
This could be used as a base to understand using both I2C/GPIO in the same code.
OK this example is for I2C but the same principles apply to SPI.

More information can be found in AN_108 Command Processor For MPSSE and MCU Host Bus Emulation Modes (https://ftdichip.com/wp-content/uploads/2020/08/AN_108_Command_Processor_for_MPSSE_and_MCU_Host_Bus_Emulation_Modes.pdf).

Best Regards,
FTDI Community