Software related controls for download and boot of PL2303 download line for battleship STM32

Source: Internet
Author: User

The following may be some errors or something, you are welcome to correct me.
About battleshipSTM32on the Development BoardBOOT0and theBOOT1, many people will have doubts, especially softwareMcuispon why isDTRthe low level,RTShigh-level access to the download mode, regardless of the hardwareBOOT0and theBOOT1connection.

To understandBOOT0and theBOOT1, the first thing to know is that there are three modes,
(1)BOOT0Connect high level,BOOT1low level, if thisRESET I/Oreset Signal, the software click on the download, this time the program will be burned to write into +inside
(2)BOOT0Low Level,BOOT1low level, if thisRESET I/OThe reset signal is generated by the port, +will readFLASHprogram execution.
(3)BOOT0Low Level,BOOT1High level, if thisRESET I/OThe reset signal is generated by the port, +will readFLASHprogram execution.
We can see (2) and (3) is the same pattern, and(1)and the(2)inBOOT1is high, so we're on the hardware.BOOT1is to directly connect the lower level, so that when we control the mode is actually just controlBOOT0only.
Now see ourCH340control, first of all, we are inMcuispyou can see that the selectionDTRthe low level,RTShigh-level into the download mode, this time ignoring the hardware interface, at this time when we click the download program, the softwareMcuispwill controlDTRto low-level,RTSis high;CH340in thedtr#is high,rts#to a low level, (#word indicates the opposite).
You can now seeQ2and theQ3transistor is on, at this timeBOOTis the high level,RESETis low, and a reset signal is required toRESETpull back to high and low level, so the software controls at this timedtr#output Low, soRESETbecomes high, the softwareMcuispis automatically downloaded, this mode (1all the conditions have been met, so we can know that the program is burned and written intoSTM32inside, this time the software will no longer controlCH340,equivalentCH340as the disconnect, if we download theMcuispThe option of the inside (post-Program execution) is also checked, then the software is controlled via the serial portSTM32ReadFLASHon the program, so we will see development on the implementation of our program, such as the marquee.
So when we choose the mode, we choose (DTRthe low level,RTShigh-level access to the download) mode, and not the other.
Next up is the Development BoardBOOT0hardware interface, a lot of people don't understand whyBOOT0The hardware interface is fixed and the software is still controllable for the following reasons:

CH340software control on theBOOTresistor to be connectedR71to be1K, hardware jumper capsBOOT0connected toR40to be100K, the difference between the two times, it is obvious that only we want to use the software interface, the hardware interface is equivalent to ignore, because the software interfaceBOOT0the potential is much closer toVCC3.3orGND, while we do not use the softwareCH340hardware interface comes in handy because the software controls theCH340is equivalent to disconnection, soBOOTThe hardware connection is not affected even though it is fixed.
And now the pattern (2), we putPA9,PA10and theRxd,txdon the jumper cap away, and then putBOOT0received0, and then manually press theRESETafter resetting the key, we can seeSTM32Start Reset ExecutionFLASHinside of the program.
And we're going to download the program to +The inside can also be likeWuyisingle-chip microcomputer, no needCH340equal level conversion, just use onePL2303download line, directly toPA9and thePA10, and then putBOOT0Connect high level,BOOT1low-level, then clickRESETPress the button, clickMcuispDownload the program, you can also download it at this time.
(Some points to note in this process: it is possible that the download was unsuccessful,Mcuispa bunch of numbers appear on the window, which may bePL2303drive problem, only need to reinstall under the driver is good).
And when someone does an experiment, they may find that they justBOOT0switching from high to low can still be a download mode, which can be a problem with capacitance storage on the chip, because as long as the charge on the capacitor is more than half the high level, so long as the charge on the capacitor is released in a moment.
Note: The program Burns write and executes when burning (mode1) and execution (mode2) is divided into two modes, two-step execution


Software related controls for download and boot of PL2303 download line for battleship STM32

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.