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: FT_SetFlowControl: configuring flow control before entering MPSSE mode  (Read 10472 times)

seo

  • Newbie
  • *
  • Posts: 5
    • View Profile

Hello,

FTDI Application Note 108 "Command Processor for MPSSE and MCU Host Bus Emulation Modes" suggests the following: "NOTE: To ensure that the device driver will not issue IN requests if the buffer is unable to accept data, add a call to FT_SetFlowControl prior to entering MPSSE or MCU Host Bus modes."

FTDI Application Note 135 "FTDI MPSSE Basics" gives the following wording: "FT_SetFlowControl – Configure for RTS/CTS flow control to ensure that the driver will not issue IN requests if the buffer is unable to accept data."
The code suggested by Application Note 135 is as follows:
FT_SetFlowControl(ftHandle, FT_FLOW_RTS_CTS, 0x00, 0x00); //Turn on flow control to synchronize IN requests

Could you please explain the rationale behind it? Why should we configure for RTS/CTS flow control before entering MPSSE mode? As far as I understand in MPSSE mode there are no pins that would act as RTS and CTS (in the sense as RTS/CTS pins are used e.g. in UART mode).

Thank you in advance!
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 892
    • View Profile

Hello,

We recommend to enable the RTS_CTS flow control when using MPSSE, you can do this when configuring the device after opening the port and before entering MPSSE mode.

As you mentioned, there are no RTS or CTS lines on the device in this mode and so using RTS/CTS mode in MPSSE does not require any special connections or signals.

But enabling RTS/CTS mode also enables the flow control features in the driver itself, and so the driver wont try to read data from the chip if it does not have room for the data. Without flow control enabled, this data would otherwise have been lost. You may see the MPSSE wait until space is available if the driver buffer fills and the driver stops taking data over USB and the chip buffer then fills.

Best Regards, FTDI Community
Logged

seo

  • Newbie
  • *
  • Posts: 5
    • View Profile

Thank you for your explanation!
Logged

cioma

  • Newbie
  • *
  • Posts: 17
    • View Profile

So if we don't use FTDI drivers then there is no need for us to enable RTS_CTS flow control when using MPSSE, correct?
Logged