FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: Need to use FT4232H Port A in all modes I2C/SPI/JTAG/UART  (Read 11973 times)

Slava

  • Newbie
  • *
  • Posts: 5
    • View Profile
Need to use FT4232H Port A in all modes I2C/SPI/JTAG/UART
« on: January 01, 2024, 03:11:36 PM »

I need to use port A of the FT4232H in all I2C/SPI/JTAG/UART modes and switch between them in software. I don't see any problem in switching between I2C/SPI/JTAG, but I don't understand how to switch it from I2C to UART. Please help!

Regards,
Slava
Logged

Slava

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Need to use FT4232H Port A in all modes I2C/SPI/JTAG/UART
« Reply #1 on: January 04, 2024, 12:04:50 PM »

Hi,

I realized that the only option I have is to use bitbang mode and implement the UART protocol myself. It's not a problem, I just need to send 10 bytes for every byte I actually wanted to send. However, when I use FT_SetBaudRate() to set the UART speed, the resulting speed is 5 times faster than I expected. So to get 115200 I have to call FT_SetBaudRate(115200/5). What am I doing wrong?

Regards,
Slava
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 897
    • View Profile
Re: Need to use FT4232H Port A in all modes I2C/SPI/JTAG/UART
« Reply #2 on: January 04, 2024, 03:42:27 PM »

Hi,
If you use FT_SetBitMode to reset (zero for reset)   
https://ftdichip.com/wp-content/uploads/2023/09/D2XX_Programmers_Guide.pdf (Page 66, D2xx programmers guide)

Regards
FTDI Community
Logged

cioma

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Need to use FT4232H Port A in all modes I2C/SPI/JTAG/UART
« Reply #3 on: April 19, 2024, 12:06:32 PM »

I believe you can switch between UART and MPSSE (I2C/SPI/JTAG) modes in software using set_bit_mode USB control request but I don't know if it's exposed in FTDI drivers.
Logged