1. Overview of STM32 BOOT
The storage media corresponding to the three startup modes of STM32 are all built-in to the chip, they are:
User Flash: BOOT1=x BOOT0=0 The built-in Flash of the chip, i.e. the main memory Flash
SRAM: BOOT1=1 BOOT0=1 The SRAM area built into the chip is the memory.
System memory: BOOT1=0 BOOT0=1 A specific area inside the chip is called system memory. A Bootloader is preset in this area when the chip leaves the factory, which is usually called the ISP program. The content of this area cannot be modified or erased after the chip leaves the factory, that is, it is a ROM area.
There are two pins BOOT0 and BOOT1 on each STM32 chip. The level status of these two pins when the chip is reset determines which area the program starts from after the chip is reset, see the table below:
BOOT1=x BOOT0=0 Boot from user flash memory, which is the normal working mode.
BOOT1=0 BOOT0=1 Boot from system memory. The program function started in this mode is set by the manufacturer.
BOOT1=1 BOOT0=1 Boot from built-in SRAM. This mode can be used for debugging.
It should be noted that the built-in SRAM is generally not used for startup (BOOT1=1 BOOT0=1), because the data in the SRAM will be lost after the power is off. In most cases, SRAM is only used for debugging, and it can also be used for other purposes. For example, to do local diagnosis of faults, write a small program to load it into the SRAM to diagnose other circuits on the board, or use this method to read and write the Flash or EEPROM on the board. This method can also be used to remove the read and write protection of the internal Flash. Of course, when removing the read and write protection, the content of the Flash is also automatically cleared to prevent malicious software from copying.
Generally, both BOOT0 and BOOT1 jumpers are set to 0 (GND), which means the system runs normally from the on-chip Flash. However, in the case of ISP download, you need to set BOOT0=1 and BOOT1=0. After the download is complete, connect the BOOT0 jumper back to 0 so that the system can run normally.
For general applications, you can directly ground the BOOT0 and BOOT1 pins without setting jumpers. When using the IAR debugger, you can choose RAM debugging or Flash debugging, which has nothing to do with the configuration of BOOT0 and BOOT1.
When I was designing the program for stm32, I encountered a conflict between the nss pins of spi3 and the pins of JTAG. So in order to solve this problem and make spi3 work normally, I disabled the JTAG function through the library function GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable,ENABLE);, so that spi3 can be used normally, but the result is that the program cannot be burned through JTAG! Therefore, the topic of burning the program through the ISP serial port has surfaced!
2. The usage process of STM32 ISP tool.
Previous article:stm32 adc sampling rate
Next article:Differences between STM32 advanced timers, general timers, and basic timers
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
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
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- [GD32L233C-START Review] 8. Comprehensive Application of Kitchen Countdown Timer
- What are the components FB1 and FB2 on the lpc824 DIP development board?
- Can signaltap be set to automatically trigger after power-on? I encounter abnormal counting after power-on.
- Reasons for connecting pull-up resistors to the I2C bus
- About Bluetooth External Antenna
- CC3200 Kit - OURS-SDK-WFB Getting Started
- Initial understanding of R329 development board - system
- BearPi-HM Nano 3 + Analysis of source code writing process under vscode
- STC15W104 power-off wake-up can not be done, please help
- Shift register based frequency divider