【STM32】STM32F103 program download (serial port mode)

00. Table of Contents

01. Overview

There are many ways to download programs for STM32: USB, serial port, JTAG, SWD, etc. These methods can all be used to download code for STM32. However, the most commonly used and economical method is to download code to STM32 through the serial port. We will introduce to you how to use the serial port to download code to STM32.

The serial port download of STM32 is generally downloaded through serial port 1. The STM32 development board is not downloaded through the RS232 serial port, but through the built-in USB serial port. It looks like USB downloading
(only one USB cable is needed, no serial port cable is required). In fact, it is converted from USB to serial port and then downloaded.

02. CH340 driver installation

Insert image description here

After the driver is successfully installed, unplug the USB cable and plug it back into the computer. The computer will automatically install the driver. After the installation is completed, you can find the USB serial port in the computer's device manager (if it cannot be found, restart the computer).
Insert image description here

Our USB serial port is recognized as COM11. What needs to be noted here is: different computers may be different. Yours may be COM4, ​​COM5, etc., but for USB-SERIAL CH340, this must be the same.

If the USB serial port is not found, you may have installed it incorrectly, or the system may be incompatible.

After installing the USB serial port driver, we can start to download the serial port code. Here our serial port download software is flymcu. This software is an upgraded version of mcuisp. It is developed by the author of mcuisp. The software is free at www.mcuisp.com Download, the CD of this manual also comes with this software, version V0.188.

03. Serial port download program steps

3.1 Connect the serial cable to the board
Insert image description here

3.2 Open FlyMCU software

FlyMcu serial port download.zip

Insert image description here

3.3 Select the Hex file to download

Insert image description here

3.4 Set the serial port and baud rate (baud rate 115200)
Insert image description here

3.5 Click to start programming
Insert image description here

Finally, the lights flash alternately, indicating that the program has been downloaded.

04. Discussion

05. Appendix

Description: FlyMCU is free software

Download: STM32F4 serial port download software (FLYMCU).rar

Guess you like

Origin blog.csdn.net/dengjin20104042056/article/details/133443688