Reasons for stm32 serial port communication failure

1. Receive garbled characters

1. The main reason is that the baud rate does not match between the microcontroller and the host computer. This is often caused by careless users, solutions, mainly the following:
modifying the baud rate serial assistant,
the solution as shown in FIG
modifications microcontroller baud rate setting, as the solution
shown in FIG.
If the MCU and PC The baud rate is the same, it may be HSE (external high-speed clock source) configuration error, the solution is as shown in the figure below

2. Serial port occupation

Three, hardware problems

The USB to TTL chip is damaged or soldered.

Guess you like

Origin blog.csdn.net/weixin_41344412/article/details/114150123