STM32 single-chip computer program Download Method summary

Source: Internet
Author: User

First, the serial port download:

1.MCUISP serial software One-click Download settings:

DTR Low power level, RTS high entry bootload serial download on the ch340 chip corresponds to the DTR and RTS output levels contrary to the level set by the computer software. One-click Download circuit according to the ch340 chip corresponding PIN control signal to complete the corresponding function of the specific implementation process is as follows:

2. MCU start setting microcontroller low level boot0=0,boot1=x, from user area Flash start boot0=1,boot1=0, enter the serial port download area boot0=1,boot1=1, from SRAM start change boot0 level can start from different regions

3. One-click Download circuit is as follows:

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/8A/23/wKioL1gpJGXS5sjsAAC0Aoyj9OM109.jpg-wh_500x0-wm_3 -wmp_4-s_1188520636.jpg "title=" 1.jpg "alt=" Wkiol1gpjgxs5sjsaac0aoyj9om109.jpg-wh_50 "/>

USB to serial port

USB to the serial port, we choose is ch340g, stability tested good.

The combination of Q2 and Q3 in the diagram forms a one-click Download circuit, which requires only the MCUISP software setup: DTR's low-level reset, RTS high-input bootloader. You can download the code in one click without having to manually set the B0 and press reset. Where reset is the reset signal of the Development Board, the BOOT0 is the B0 signal of the start mode. Usb_232 is a miniusb, providing ch340g and computer communication interface, while the circuit board can supply power, VUSB is from the computer USB power supply, usb_232 is the main power port of the Development Board.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8A/27/wKiom1gpKIPS4D0zAAFPac8XzWs978.jpg "title=" Stm32 serial port pin. jpg "alt=" wkiom1gpkips4d0zaafpac8xzws978.jpg "/>

Serial port corresponding to pin diagram

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8A/23/wKioL1gpJMGRQFF9AACCAjp4RmA458.jpg-wh_500x0-wm_3 -wmp_4-s_3521911371.jpg "title=" 1.jpg "alt=" Wkiol1gpjmgrqff9aaccajp4rma458.jpg-wh_50 "/>

Must choose single-chip serial port 1 download

The figure of Txd/rxd is relative to the ch340g, that is, the USB serial port to send and receive the foot. Usart1_rx and Usart1_tx are relative to Stm32f103zet6. In this way, through the docking can realize the USB serial port and STM32F103ZET6 serial communication. At the same time, P6 is the export of PA9 and PA10.

The advantage of this design is that it is very flexible to use. such as the need to external TTL serial and STM32 communication, only need to unplug the jumper cap, through DuPont connected to the external TTL serial port, you can achieve and external equipment communication; I have a board to communicate with the computer, but the computer does not have a serial port, then you can use the development of RXD and TXD To connect your device, use the Development Board as a USB port.

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/8A/26/wKiom1gpJUuiIPxrAABSAlrexbg185.jpg-wh_500x0-wm_3 -wmp_4-s_858405236.jpg "title=" 1.jpg "alt=" Wkiom1gpjuuiipxraabsalrexbg185.jpg-wh_50 "/>

System version Start Mode circuit

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/8A/26/wKiom1gpJbOwIeZVAACAAubh7Gw166.jpg "title=" 1.jpg " alt= "Wkiom1gpjbowiezvaacaaubh7gw166.jpg"/>

BOOT0, BOOT1 Boot mode table (Hardware connection)

One-click Download circuit, through the serial port DTR and RTS signal, to automatically configure the BOOT0 and reset signal, so do not need users to manually switch their status, direct serial download software automatic control, can be very convenient to download code. It's OK to set it up beforehand.

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/8A/23/wKioL1gpJjbR6staAABkAoFuUdc283.jpg-wh_500x0-wm_3 -wmp_4-s_3156083599.jpg "title=" 1.jpg "alt=" Wkiol1gpjjbr6staaabkaofuudc283.jpg-wh_50 "/>

Mcuisp Software Interface

Open Mcuisp, click Search Serial port, will automatically find the board of the onboard serial port, the default baud rate in bps is 460800, in order to stabilize the download can choose a lower baud rate, lower left corner select: DTR low power, RTS high-level into the BootLoader. Then load the burn write file.

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8A/27/wKiom1gpJ2eAuWRfAAI6syBQ3xw230.jpg-wh_500x0-wm_3 -wmp_4-s_2006164954.jpg "title=" 1.jpg "alt=" Wkiom1gpj2eauwrfaai6sybq3xw230.jpg-wh_50 "/>

Read device information

Before burning the program, click to read the device information will appear on the right block diagram information, indicating that the circuit board serial connection is successful.

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/8A/27/wKiom1gpJ9iibRcWAAIqsAFH264535.jpg-wh_500x0-wm_3 -wmp_4-s_4181098831.jpg "title=" 1.jpg "alt=" Wkiom1gpj9iibrcwaaiqsafh264535.jpg-wh_50 "/>

Click to start programming, the program begins to burn, the success of the burn will appear on the right block diagram shows the information, indicating that the program burned to write successfully.



This article is from the "Stm32 microcontroller" blog, please be sure to keep this source http://stm32.blog.51cto.com/8583230/1872550

STM32 single-chip computer program Download Method summary

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.