Application principle of STM32 BOOT0 and BOOT1

Publisher:Yinyue1314Latest update time:2018-08-22 Source: eefocusKeywords:STM32  BOOT0  BOOT1 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

When many netizens use Keil to download programs, the download line is connected normally, but the program cannot be downloaded, and it prompts that the chip is not connected. The possible cause of the error is BOOT0.

First, let’s introduce how BOOT0 and BOOT1 are connected and the connection method.

Application principle of BOOT0 and BOOT1 of STM32 microcontroller
The storage media corresponding to the three boot modes of STM32 are all built-in chips, which are:
1) Main flash memory = Flash built into the chip. This is also the normal working mode
2) SRAM = RAM area built into the chip, that is, memory.
3) System memory = A specific area inside the chip. A Bootloader is preset in this area when the chip leaves the factory, which is usually called
ISP program. No one can modify or erase the content of this area 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 state of these two pins when the chip is reset determines the chip reset.

After the bit is set, the program will be executed from which area, see the following table:


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 power failure. In most cases, SRAM is only used for debugging, and it can also be used for other purposes. For example, to perform local fault diagnosis, write a small program and load it into the SRAM to diagnose other
circuits , 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 the read and write protection is removed
, the contents of the Flash are automatically cleared to prevent malicious software from copying.
Generally, the BOOT0 and BOOT1 jumpers are both jumped to 0 (ground). Only in the case of ISP download, BOOT0=1, BOOT1=0. After the download is complete, put

Connect the jumper of BOOT0 back to 0, that is, BOOT0=0, BOOT1=0.

Should STM32F103 configure BOOT0 and BOOT1 to be directly grounded or through resistors?
Q: My STM32F103RET6 is down because BOOT0 and BOOT1 are directly grounded. It's very strange. Has anyone encountered this?
A: The hardware design guide of STM32 also recommends that BOOT0 and 1 be connected to resistors and then to ground.
BOOT0 and BOOT1 are grounded through 10k resistors respectively to facilitate serial port downloading. The downloader controls BOOT0 to a high level, and after downloading, BOOT0 is
restored to a low level. STM32 can enter the user program after resetting. Normally, the user program is directly entered when power is turned on. Whether
boot0 is connected to a 10k resistor or directly to ground, it will not cause chip damage.

Note: If the JTAG related pins are used as ordinary IO, downloading will fail (when BOOT0 is at low level). The solution is to download the program once through the serial port and then download it through JLINK, or configure BOOT0 to high level before downloading.


Keywords:STM32  BOOT0  BOOT1 Reference address:Application principle of STM32 BOOT0 and BOOT1

Previous article:STM32 common download methods
Next article:STM32 BOOT0, BOOT1 configuration

Recommended ReadingLatest update time:2024-11-16 14:35

STM32 serial port usage experience (I) - DMA + idle interrupt reception
1. Why is it used? I have written an article before, "About the problem of CubeMX's serial port full-duplex receiving and sending being locked", which discussed the phenomenon that the STM32 serial port will be locked in full-duplex mode. The solution at that time was to add an unlocking mechanism to the serial port
[Microcontroller]
Win-win cooperation and co-building of the ecosystem are the DNA of STM32
From April 26 to 27, 2019, the annual STMicroelectronics STM32 Summit was held as scheduled in Shenzhen. According to final statistics, the actual number of participants reached 3,500, and the number of online participants reached a maximum of 50,000. Because STM32 has been a great success in China, ST Microelectroni
[Microcontroller]
Win-win cooperation and co-building of the ecosystem are the DNA of STM32
Solution to STM32 not being able to simulate after disabling the JTAG function in the program
STM32 cannot perform JTAG simulation after disabling the JTAG function in the program. In the program, the function that usually disables JTAG is as follows:   //Change the mapping of the specified pin GPIO_Remap_SWJ_Disable SWJ completely disabled (JTAG+SW-DP)   GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENAB
[Microcontroller]
STM32 RTC (Real Time Clock) 32.768kHz Crystal Oscillator Start-up Guide
It is an industry consensus that the STM32 RTC crystal oscillator often fails to oscillate. Many people ask for help on various electronic forums with questions like "Ask an expert for advice! What should I do if the RTC crystal oscillator does not oscillate?", and the answer can basically be summarized as "The expert
[Microcontroller]
STM32 USB device circuit design
When the STM32F105 is configured as a USB device, the PA9/OTG_FS_VBUS is used to detect the presence of a USB host. STMicroelectronics design evaluation shows the PA9/OTG_FS_VBUS pin connected to 5V VBUS through a zero ohm resistor. There are two potential problems with this approach. The first potential problem is th
[Microcontroller]
STM32 USB device circuit design
STM32 GPIO button experiment
Experimental board: A Stm32 development board with buttons. I use the Open107V experimental board, model 107 Library function: STM32 official 3.5 library Other materials: ST-LINK, some jumpers Experimental principle: The button experiment is similar to the LED experiment. The GPIO lighting outputs high and low levels
[Microcontroller]
About the startup code of the stm32f1ox.h header file and the macro definition in the compiler
Today, when debugging stm32f107vc, I found that its external clock is 25M, which is different from the 8M crystal oscillator of the previous stm32f103rbt6. Let me summarize my findings here. stm32f107vc is an interconnect device, and its startup file should be .cl. There are several startup files: .ld  .md .hd
[Microcontroller]
stm32 timer interrupt time calculation
The division value means that you reduce the frequency of the system clock. Assuming the clock frequency is 72Mhz, and the division value is 7199, now your timer value is 10kHz, which means that every time you count a number, then 1/(10^4) seconds have passed, then your reload value is your time. If the value is 9999,
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号