STM32 USART communications

Thread Starter


Joined Jul 19, 2020
Hi, I want to control my stm32 with my computer and I want to use UART communication, I use CH340 to convert my ttl signal to USB signal, I want to make supervisory system to control my stm, I can't figure out how do the supervisory system.


Joined Oct 2, 2009
You are missing a lot of information.
What STM32? There are a hundred varieties of STM32.
What is connected to the STM32?
What are you trying to do with the STM32?

I don't know anything about CH340. I have only used Silicon Labs CP2102.
Get one of these things:

Thread Starter


Joined Jul 19, 2020
I use STM32F103C8 and I will use CH340 to convert my USB signal to TTL ( or uart ) and I will build a program I can send data to stm32 and stm32 send to my PC information about the sensors

Dave Lowther

Joined Sep 8, 2016
I can't figure out how do the supervisory system.
Is it just the PC part of the supervisory system you can't figure out how to do?
What is it exactly that you can't figure out how to do? Is it how to send and receive data over the COMx port from code you are writing on your PC?
What language do you intend to use to write code on your PC?
Are you having trouble deciding how to format messages to send between your PC and the STM32?
If you can answer the above questions, and perhaps answer some questions I didn't think of asking, then people here will be able to give you help sooner without having to play 20 questions.
Best regards


Joined Mar 24, 2020
a) You can use VCP to connect STM32 directly to USB and look like a com port (without the CH340).
b) You would still need ESD protection and the USB connector so for a 1-of prototype the CP2102 may be easiest.

c) The 14pin ST-Link connection supports a UART interface to the PC, good for development

d) You can also put a simple 100mil header on your board and use an FTDI or similar cable:
FTDI TTL-232R-3V3 = Direct to 3.3V MCU, good for development and field debugging
FTDI TTL-232R-5V = Direct to 5V MCU
Similar for RS-485:
FTDI USB-RS485-WE-1800-BT to RS-485 bus, good for snooping RS-485 protocol during development