Getting STM32 "Blue pill" to talk UART over USB

Thread Starter

hrs

Joined Jun 13, 2014
524
Hi,

I have a Blue pill board with an STM32F103C8T6 MCU on it. I want to to talk UART to it from my PC. When I plug it in there's nothing in dmesg, udevadm monitor, lsusb etc. It doesn't show up as anything when connected to the PC with a USB cable. It does draw power over USB to run the LED blink program that I flashed to it.

What I want is to plug my ST-Link/V2 in one USB port with debug wires connected to the Blue pill and plug the Blue pill into another USB port for UART.

The internet says PC -> ST-Link/V2 -> Blue pill will not allow me to UART.
There's some mention of a bootloader that will enable CDC USB but that seems to be entirely different.
Should I buy a USB-TTL adapter?

Bigger picture I'd like to, for example, send "LED on" to the MCU, MCU switches the LED on the sends back "Done". I don't particularly care if that's done with UART or CDC or something else but I assume UART would be easiest for getting started.

I know almost nothing about this so any suggestions are welcome.
 

MrChips

Joined Oct 2, 2009
34,700
You need a driver installed on your PC in order for it to recognize the STM32 on USB.

The simple solution is to get a CP2102 USB-to-UART adapter.
 

Thread Starter

hrs

Joined Jun 13, 2014
524
Thanks, I'll order an adapter.
Meanwhile I might try this USB CDC thing. From what I read this should in principle work without additional hardware. And allegedly it's "better" than UART.
 

mehmetbey

Joined Apr 10, 2025
11

Futurist

Joined Apr 8, 2025
732
Hi,

I have a Blue pill board with an STM32F103C8T6 MCU on it. I want to to talk UART to it from my PC. When I plug it in there's nothing in dmesg, udevadm monitor, lsusb etc. It doesn't show up as anything when connected to the PC with a USB cable. It does draw power over USB to run the LED blink program that I flashed to it.

What I want is to plug my ST-Link/V2 in one USB port with debug wires connected to the Blue pill and plug the Blue pill into another USB port for UART.

The internet says PC -> ST-Link/V2 -> Blue pill will not allow me to UART.
There's some mention of a bootloader that will enable CDC USB but that seems to be entirely different.
Should I buy a USB-TTL adapter?

Bigger picture I'd like to, for example, send "LED on" to the MCU, MCU switches the LED on the sends back "Done". I don't particularly care if that's done with UART or CDC or something else but I assume UART would be easiest for getting started.

I know almost nothing about this so any suggestions are welcome.
What's your ultimate goal, what does "talk UART to it" mean?
 

Thread Starter

hrs

Joined Jun 13, 2014
524
I got USB CDC to work and without the need for a boot loader. The MCU now talks to the PC, I'll try PC to the MCU next.
 
Top