STM32 BOOT Overview

Publisher:美好梦想Latest update time:2016-08-05 Source: eefocusKeywords:STM32  BOOT Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The storage media corresponding to the three startup modes of STM32 are all built-in to the chip, they are:

1) User Flash = Flash built into the chip.
2) SRAM = RAM area built into the chip, which is the memory.
3) System Memory = A specific area inside the chip. A Bootloader is pre-installed 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.

When the system is powered on, the CPU first determines which mode to start based on these two pins, then maps the starting address of the corresponding mode to address 0, and starts execution from address 0.
 
When the chip leaves the factory, ST burns a bootloader into ROM, which is system memory. The main task of this bootloader is to download the program to the built-in flash through uart1. The workflow is as follows:
[Transfer] Overview of STM32 BOOT - Xiaozao Nian Gao - Xiaozao Nian Gao
 
The system memory boot mode must be exited after completing its task. This exit method is achieved through a hardware reset. During reset, the two pins BOOT[1:0] must be configured to enable the CPU to enter the appropriate mode after restarting.
 

        It should be noted that the built-in SRAM is generally not used for booting (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, the BOOT0 and BOOT1 jumpers are set to 0.

Keywords:STM32  BOOT Reference address:STM32 BOOT Overview

Previous article:STM32 Printf function implementation method
Next article:DMA working mode of USART6 of stm32F407

Recommended ReadingLatest update time:2024-11-17 06:30

Summary of stm32 serial communication debugging
This article is divided into two parts, namely "Serial port initialization taking USART1 as an example" and "Problems encountered in debugging" Serial port initialization using USART1 as an example This program calls the firmware library that comes with stm32. The specific files in the project are shown in the figure
[Microcontroller]
Summary of stm32 serial communication debugging
How to use JLink to download and burn the boot program to NorFlash
1. Tools and wiring harness preparation 1. Prepare a set of Jlink V8 (try to use this version, other versions have not been verified); 2. Make a JTAG adapter cable from the Jlink downloader to the interface of the mini2440 development board, as shown in Figure 1-3; 3. Install the JLinkARM burning tool (it is recommend
[Microcontroller]
How to use JLink to download and burn the boot program to NorFlash
STM32+SDIO+FATFS file system direct reading SD card
There are many small embedded file systems on the Internet. Of course, FATFS is very famous for its small size and free. Of course, the domestically produced znFAT from Zhennan is also open source, easy to use and extremely resource-saving! It is very suitable for 51 single-chips. More importantly, it supports Chinese,
[Microcontroller]
STM32+SDIO+FATFS file system direct reading SD card
STM32 Study Notes 16 - Off topic, make your own engineering board
1. My study plan is to design the hardware of STM32 microcontroller: The first step is to use the 48-pin STM32F103CBT6 chip to achieve the basic peripheral hardware, PWM, serial port, and I/O for the simple control of the optoelectronic platform. Leave the SPI and I2C pins. The second step is to make a functional bo
[Microcontroller]
8 working modes of STM32GPIO
1. Push-pull output: can output high and low levels, connect digital devices; push-pull structure generally means that two transistors are controlled by two complementary signals, and one transistor is always turned on while the other is turned off. The high and low levels are determined by the power supply of the IC.
[Microcontroller]
8 working modes of STM32GPIO
STM32 hardware I2C and AT24C16
Configuration of CubeMX The following are the places I modified. Just pay attention to the basic configurations such as I2C and system clock. I don’t want to say too much. The pictures speak for themselves.    Homemade library for AT24C64 AT24C64.c #include "AT24C64.h" #include "i2c.h" void AT24CXX_Write(u16
[Microcontroller]
Based on the transplantation of Ok6410 development board u-boot
Prerequisite environment: Win7+VirsualBox+ok6410+u-boot-2010.03 1. Download u-boot-2010.03 source code ftp://ftp.denx.de/pub/u-boot Unzip, I changed the permissions of all files to avoid trouble tar jxvf u-boot-2010.03.tar.bz2 sudo chmod -R 777 u-boot-2010.03/*
[Microcontroller]
What does GPIOB->BSRR mean in stm32
GPIOB->BSRR = 0x01 is to raise GPIOB port 0 to a high level GPIOB- BRR = 0x01 is to reduce the GPIOB port 0 to a low level GPIOB- BSRR = 0x02 is to raise GPIOB port 1 to a high level GPIOB- BRR = 0x02 is to reduce the GPIOB port 1 to a low level GPIOB- BSRR = 0x04 is to raise GPIOB port 2 to a high level GPIOB- BRR =
[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号