1. First look at the stm32 startup mode
The boot mode of stm32 is determined by the boot0 and boot1 pins of the 32 chip. It is divided into embedded flash boot mode (normal boot mode), memory boot mode, and rom boot mode.
The corresponding relationship between the boot mode and the pin high and low levels is as follows. Within the four clock cycles of chip reset, the levels of boot0 and boot1 pins will be read to determine the operation of the chip.
model.
boot0=0, boot1=x ---------------- Embedded flash boot mode
boot0=1, boot1=1 ----------------Memory boot mode
boot0=1, boot1=0----------------rom boot mode (serial port isp download program)
2.Serial port isp download method
ISP serial port download HEX program steps
1) Set boot0=1, boot1=0
2) Use mcuisp or flashloader to download the program to the embedded flash
3) Set boot0=0, boot1=0 to run the program
3. jtag-swd download method
The pins JTMS, JTCK, VCC, and GND are used to download and debug the program. The specific settings need to be studied.
This is the pin and the wiring of the JLink is as follows
JTMS--TMS/SWDIO
JTCK--TCK/SWCLK
VCC GND provides power for the entire board
------------------------------------------Gorgeous dividing line------------------------------
Three programming download methods for STM32
J-link can debug almost all arm chips, it is a good thing. Here are three ways to download programs for stm32:
1. J-Flash download (requires J-link)
2. MDK configuration download (requires J-link)
3. ISP download (serial port download, you need to use the officialhttp://www.segger.com/cms/jlink.html .
Open the run, first configure the cpu corresponding to the cpu of the development board,
Connect the development board and J-link to the computer, and then connect
The connection is successful as shown in the following figure:
Then select the hex file you want to download, open it with the shortcut key ctrl+O (or file/open), and select the file.
Then select Target/Auto to burn automatically. (Sometimes it is strange that it cannot be successful in one try. In this case, you need to burn again manually, Target/Erase chip-->Target/Erase sectors-->Target/Program && verify).
OK, the burning is successful.
----------------------------------------------------------------------------------------------
2. MDK configuration download, that is, online debugging and downloading in MDK. First, make sure that the j-link driver has been successfully installed. The rest of the work is just to set up MDK.
In fact, you can also choose J-LINK/J-TRACE.
Click setting to start setting.
Click add and select cpu.
OK, you can debug and download online:
----------------------------------------------------------------------------------------------
3.ISP download (serial port download)
(1) Download the software Flash_Loader_Demonstrator_V1.3_Setup.exe and click Next to install it. Note: The version is 1.3. I tried version 2.1 and it failed to connect successfully.
According to the prompts: Set the boot mode, set BOOT0=1, BOOT1=0, and then restart the system. Connect. No more words below, just look at the picture.
(2) Download using STMISP.EXE, which is an ISP application for STM32
STMISP.rar
Then without saying anything else, just post the pictures.
Previous article:STM32 serial port one-key download circuit
Next article:Detailed explanation of STM32 ISP upgrade
Recommended ReadingLatest update time:2024-11-15 17:38
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- This electronic clock program question
- EEWORLD University ---- Live Replay: Security Series 20 - Configuring MPU Security in Your Factory
- Vicor white paper download - Bidirectional power: The driving force behind the "quiet" change in the world
- Analysis of self-oscillation and negative voltage generation circuits. Please help me
- MSP430 implements 800Hz buzzer and stopwatch
- [HC32F460 Development Board Review] 05. Recognition and processing of matrix buttons
- How to calculate the cost of surveillance installation and cleaning work
- 100 Practical Tips for FPGA Design Experts
- Is it true that the greater the memory depth of an oscilloscope, the better?
- Comprehensive understanding of antennas, the knowledge you don’t know!