ST-LINK V2.1 doesn't connect COM port for serial monitor

Post here first, or if you can't find a relevant section!
STM32ardui
Posts: 142
Joined: Mon May 06, 2024 1:46 pm
Answers: 1
Location: Germany

Re: ST-LINK V2.1 doesn't connect COM port for serial monitor

Post by STM32ardui »

ag123 wrote: Wed Jul 03, 2024 6:55 pm make sure boot0 is at gnd so that it doesn't trip stm32f103 into programming mode on reset.
BlackPill has 2 buttons to set chip into boot mode.
But with SWD and STM32CubeProgrammer I don't need to push them, Programmer sets it automaticly into bootmode.
Is BluePill different?
ag123
Posts: 1898
Joined: Thu Dec 19, 2019 5:30 am
Answers: 30

Re: ST-LINK V2.1 doesn't connect COM port for serial monitor

Post by ag123 »

blue pill (stm32f103) doesn't have DFU, but that it can be programmed on uart1 pa9 tx pa10 rx.
normally for the 'old' blue pill (stm32f103), boot0 (and boot1) are *jumpers*, and boot0 has to remain at gnd, if one do not want to trip stm32f103 into programming mode, especially if pa9 tx and pr10 rx is connected

st-link i.e. swd doesn't depend on boot0, but that sometimes one need to press reset on the board to connect it seemed.
justinjools
Posts: 41
Joined: Thu May 02, 2024 11:10 am

Re: ST-LINK V2.1 doesn't connect COM port for serial monitor

Post by justinjools »

I found the solution here, below. I can confirm this works for anyone else having this problem. You need to connect STM32 MCU to USB for serial monitor and ST-LINK for downloading. In Arduino IDE You can then see two ports and connect to the USB port for monitoring.

You also need to select a different board name variation for serial monitor otherwise it won't connect with the same one (bottom pic).

"ST-Link is not a Serial adapter, it is a programmer. You can't open a Serial Monitor over ST-Link.
to see the Serial prints connect the Blue Pill with USB cable. without bootloader listening on USB you can't upload over USB but it works as Serial (or Serial1?) with Serial Monitor or other terminal program"

viewtopic.php?t=90
Attachments
Serial_monitor_works.jpg
Serial_monitor_works.jpg (82.04 KiB) Viewed 1586 times
SM2.jpg
SM2.jpg (90.1 KiB) Viewed 1587 times
Last edited by justinjools on Thu Jul 04, 2024 12:50 pm, edited 3 times in total.
justinjools
Posts: 41
Joined: Thu May 02, 2024 11:10 am

Re: ST-LINK V2.1 doesn't connect COM port for serial monitor

Post by justinjools »

I bought this adapter for this purpose but it doesn't fit. They made JTAG header too wide to fit this type of closed male JTAG socket. I think it is only designed to open male pins. I'm thinking of doing some DIY adapter with 1.27mm ribbon cable now. These things I'm sure are designed to drive us mad!

JTAG (2x10 2.54mm) to SWD (2x5 1.27mm) Cable Adapter
https://www.adafruit.com/product/2094
Post Reply

Return to “General discussion”