Proposition to add uart - cts as usable gpio pin
Open source flash program for STM32 using the ST serial bootloader
Brought to you by:
tormod
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!
Anonymous
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.
Is this what we should add to the documentation (man page or wiki)?
Yes!