Menu

#133 Proposition to add uart - cts as usable gpio pin

none
New
nobody
Low
Enhancement
2023-09-26
2021-06-27
No

Lots of usb-serial cables (ie. ftdi 6-pin cables) and modules only come only with dtr and cts pins. Therefore boot0 pin control is not possible with software and has to be toggled manually. Is it possible to add cts as one of the i/o pins to toggle in gpio sequence?

Much appreciated!

Discussion

  • Chille

    Chille - 2021-07-31

    As stm32flash is communication with the USB to UART converter as a virtual COM port I don't think it will possible to control CTS in a reliable way.

    I was having the same problem as you. I tried to patch the code to handle CTS the same way as RTS and DTR are handled. It didn't work. At least not with an FT232RL on Linux.

    According to the RS232 standard the RTS and DTR pins are outputs while the CTS is an input. I checked the datasheet for FT232RL, and it does also list CTS as an input.

    I read somewhere that it is indeed possible to use CTS as an output, but that will require the D2XX driver instead of the VCOM driver. I am running Linux and the same limitation seems to apply here as well. Or maybe the limitation is in the POSIX API. Other USB to UART converters, like Prolific or CH340G, might not have the possibility to control CTS as an output at all.

    I suggest that the documentation is updated to make this clear. It would have saved me, and probably a few of other people, a few hours.

     
  • Tormod Volden

    Tormod Volden - 2021-09-03

    Is this what we should add to the documentation (man page or wiki)?

    Note that CTS is an input pin and therefore cannot be used for GPIO sequences.

     
    • Trent Piepho

      Trent Piepho - 2023-09-26

      Yes!

       

Anonymous
Anonymous

Add attachments
Cancel