2025-08-22 5:25 AM - edited 2025-08-22 5:27 AM
Hello world :)
I found STLINK-V3MODS extremely useful for automation testing (NuttX RTOS). I have ~50 different boards, some of them does not have on-board flashing capability, thus either JTAG/SWD or UART needs to be used.
Most of the boards that use UART based BootROM need external Reset and Boot pins control. These are achieved by RTS and DTR output lines of USB-to-UART converters (i.e. CP2101, PL2303, FTDIx232, CH3xx, etc).
I discovered that STLINK-V3MODS can have second UART port enabled by flashing firmware and selecting proper configuration. Both UARTs show up as separate serial port devices (i.e. /dev/cuaU0 and /dev/cuaU1 on FreeBSD). That gives two UARTS + JTAG/SWD over single USB connection, potentially serving 3 different boards under test. But VCP has no control lines, and Bridge UART has RTS/CTS (output/input) not RTS/DTR (output/output). That decreases possible use cases from 3 to 1 (SWD+VCP to automate testing of single board).
My question is would it be possible to add new configuration to STLINK-V3MODS selectable in firmware flashing upgrade tool where Bridge UART has RTS/DTR alternatively to RTS/CTS? DTR line may replace the CTS (pin 2 accroding to UM2502 Rev2 Page 17/28). If peripheral matrix prevents routing DTR to a pin where CTS currently is a software DTR implementation with a GPIO would be fine too (no need to be fast).
That would open up a whole new set of possible applications to STLINK-V3MODS and probably increase interest / sales :)
Thanks :)
Tomek
2025-08-24 12:23 PM
A picture is better than 100 words. Could you provide a drawing of desired connections?
2025-08-25 5:42 AM
Hello,
currently the CTS/RTS Hw flow control of the bridge UART is automatically managed at ST-Link (STM32F723) UART level (USART_CR3.RTSE=1), to be close to the real data flow. It is not managed from the host. Even if the lines might be controlled from the host through SET_CONTROL_LINE_STATE command for other purposes, we miss in the VCP protocol a command saying explicitly that we want to use the lines this way and not for Hw flow control (currently the ST-Link firmware ignores the SET_CONTROL_LINE_STATE command).
Anyway your idea to select a mode through STLinkUpgrade is good and can be studied for future enhancement.
Thank you
2025-08-25 1:36 PM
Good news! Thank you @S C :) If there could be even more UARTs with RTS/DTR (along with SWD but in place of other interfaces like CAN) then I could just buy more STLINK-V3MODS and handle more boards under test and not think about my own solution :) :)