An2606 Stm32 Microcontroller System Memory Boot Mode Stmicroelectronics
An2606 Stm32 Microcontroller System Memory Boot Mode Stmicroelectronics
Application note
STM32 microcontroller system memory boot mode
Introduction
This document applies to the products listed in Table 1, referred to as STM32 throughout the
document.
It describes the supported peripherals and hardware requirements to consider when using the
bootloader, stored in the internal boot ROM (system memory) of STM32 devices, and
programmed during production.
Its main task is to download the application program to the internal flash memory through one of
the available serial peripherals (such as USART, CAN, USB, I2C, I3C, SPI, FDCAN). A
communication protocol is defined for each interface, with a compatible command set and
sequence.
Contents
1 General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2 Related documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5 STM32C011xx devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.2 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.3 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6 STM32C031xx devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
6.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
6.2 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.3 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
7 STM32C051xx devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
7.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
7.2 Boot model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
8 STM32C071xx devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.2 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8.3 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
9 STM32C091xx/92xx devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
9.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
9.2 Boot model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
9.3 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
9.4 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
10 STM32F03xx4/6 devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
10.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
10.2 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
10.3 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
11 STM32F030xC devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
11.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
11.2 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
11.3 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
13 STM32F04xxx devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
13.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
13.2 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
13.3 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
14 STM32F070x6 devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
15 STM32F070xB devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
15.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
15.2 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
15.3 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
16 STM32F071xx/072xx devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
16.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
16.2 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
16.3 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
17 STM32F09xxx devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
17.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
17.2 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
17.3 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
18 STM32F10xxx devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
18.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
18.2 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
18.3 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
19 STM32F105xx/107xx devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
19.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
19.2 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
19.3 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
19.3.1 How to identify STM32F105xx/107xx bootloader versions . . . . . . . . . 102
19.3.2 Bootloader unavailability on STM32F105xx/STM32F107xx devices
with date code lower than 937 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
19.3.3 USART bootloader Get-Version command returns 0x20
instead of 0x22 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
19.3.4 PA9 excessive power consumption when USB cable is plugged
in bootloader V2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
List of tables
List of figures
1 General information
2 Related documents
For each supported product refer to the following documents, available on www.st.com:
• Datasheet or databrief
• Reference manual
• Application notes
– AN3154: CAN protocol used in the STM32 bootloader
– AN3155: USART protocol used in the STM32 bootloader
– AN3156: USB DFU protocol used in the STM32 bootloader
– AN4221: I2C protocol used in the STM32 bootloader
– AN4286: SPI protocol used in the STM32 bootloader
– AN5405: FDCAN protocol used in the STM32 bootloader
– AN5927: I3C protocol used in the STM32 bootloader
a. Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.
3 Glossary
C0 series:
STM32C011xx indicates STM32C011xx devices
STM32C031xx indicates STM32C031xx devices
STM32C051xx indicates STM32C051xx devices
STM32C071xx indicates STM32C071xx devices
STM32C091xx/92xx indicates STM32C091xx and STM32C092xx devices
F0 series:
STM32F03xxx indicates STM32F030x4, STM32F030x6, STM32F038x6,
STM32F030xC, STM32F031x4, and STM32F031x6 devices
STM32F04xxx indicates STM32F042x4 and STM32F042x6 devices
STM32F05xxx and STM32F030x8 devices indicates STM32F051x4, STM32F051x6,
STM32F051x8, STM32F058x8, and STM32F030x8 devices
STM32F07xxx indicates STM32F070x6, STM32F070xB, STM32F071xB,
STM32F072x8, and STM32F072xB devices
STM32F09xxx indicates STM32F091xx and STM32F098xx devices
F1 series:
STM32F10xxx indicates Low-density, Medium-density, High-density, Low-density
value line, Medium-density value line, and High-density value line devices:
Low-density devices are STM32F101xx, STM32F102xx, and STM32F103xx
microcontrollers, where the flash memory density ranges between 16 and
32 Kbytes.
Medium-density devices are STM32F101xx, STM32F102xx, and STM32F103xx
microcontrollers, where the flash memory density ranges between 64 and
128 Kbytes.
High-density devices are STM32F101xx and STM32F103xx microcontrollers,
where the flash memory density ranges between 256 and 512 Kbytes.
Low-density value line devices are STM32F100xx microcontrollers, where the
flash memory density ranges between 16 and 32 Kbytes.
Medium-density value line devices are STM32F100xx microcontrollers, where
the flash memory density ranges between 64 and 128 Kbytes.
High-density value line devices are STM32F100xx microcontrollers, where the
flash memory density ranges between 256 and 512 Kbytes.
STM32F105xx/107xx indicates STM32F105xx and STM32F107xx devices
STM32F10xxx XL-density indicates STM32F101xx and STM32F103xx devices,
where the flash memory density ranges between 768 Kbytes and 1 Mbyte.
F2 series:
STM32F2xxxx indicates STM32F215xx, STM32F205xx, STM32F207xx, and
SMT32F217xx devices
F3 series:
STM32F301xx/302x4(6/8) indicates STM32F301x4, STM32F301x6, STM32F301x8,
STM32F302x4, STM32F302x6, and STM32F302x8 devices
STM32F302xB(C)/303xB(C) indicates STM32F302xB, STM32F302xC,
STM32F303xB and STM32F303xC devices
STM32F302xD(E)/303xD(E) indicates STM32F302xD, STM32F302xE,
STM32F303xD, and STM32F303xE devices
STM32F303x4(6/8)/334xx/328xx indicates STM32F303x4, STM32F303x6,
STM32F303x8, STM32F334x4, STM32F334x6, STM32F334x8, and STM32F328x8
devices
STM32F318xx indicates STM32F318x8 devices
STM32F358xx indicates STM32F358xC devices
STM32F373xx indicates STM32F373x8, STM32F373xB and STM32F373xC devices
STM32F378xx indicates STM32F378xC devices
STM32F398xx indicates STM32F398xE devices
F4 series:
STM32F40xxx/41xxx indicates STM32F405xx, STM32F407xx, STM32F415xx, and
SMT32F417xx devices
STM32F401xB(C) indicates STM32F401xB and STM32F401xC devices
STM32F401xD(E) indicates STM32F401xD and STM32F401xE devices
STM32F410xx indicates STM32F410x8 and STM32F410xB devices
STM32F411xx indicates STM32F411xD and STM32F411xE devices
STM32F412xx indicates STM32F412Cx, STM32F412Rx, STM32F412Vx and
STM32F412Zx devices
STM32F413xx/423xx indicates STM32F413xG, STM32F413xH and STM32F423xH
devices
STM32F42xxx/43xxx indicates STM32F427xx, STM32F429xx, STM32F437xx, and
STM32F439xx devices
STM32F446xx indicates STM32F446xE and STM32F446xC devices
STM32F469xx/479xx indicates STM32F469xE, STM32F469xG, STM32F469xI,
STM32F479xG, and STM32F479xI devices
F7 series:
STM32F72xxx/73xxx indicates STM32F722xx, STM32F723xx, STM32F732xx, and
STM32F733xx devices
STM32F74xxx/75xxx indicates STM32F745xx, STM32F746xx, and STM32F756xx
devices
STM32F76xxx/77xxx indicates STM32F765xx, STM32F767xx, STM32F769xx,
STM32F777xx, and STM32F779xx devices
G0 series:
STM32G03xxx/04xxx indicates STM32G03xxx, and STM32G04xxx devices
STM32G07xxx/08xxx indicates STM32G07xxx, and STM32G08xxx devices
STM32G0B0xx indicates STM32G0B0xx devices
STM32G0B1xx/C1xx indicates STM32G0B1xx, and STM32G0C1xxx devices
STM32G05xxx/061xx indicates STM32G050xx, STM32G051xx, and STM32G061xx
devices
G4 series:
STM32G431xx/441xx indicates STM32G431xx and STM32G441xx devices
STM32G47xxx/48xxx indicates STM32G471xx, STM32G473xx, STM32G474xx,
STM32G483xx, and STM32G484xx devices
STM32G491xx/A1xx indicates STM32G491xx and STM32G4A1xx devices
H5 series:
STM32H503xx indicates STM32H503xx devices
STM32H562/63xx/73xx indicates STM32H562xx, STM32H563xx, and STM32H573xx
devices
STM32H523xx/33xx indicates STM32H523xx and STM32H533xx devices
H7 series:
STM32H72xxx/73xxx indicates STM32H72xxx and STM32H73xxx devices
STM32H74xxx/75xxx indicates STM32H74xxx and STM32H75xxx devices
STM32H7A3xx/7B3xx/7B0xx indicates STM32H7A3xx, STM32H7B3xx, and
STM32H7B0xx devices
STM32H7Rxxx/7Sxxx indicates STM32H7R3xx, STM32H7R7xx, STM32H7S3xx and
STM32H7S7xx devices
L0 series:
STM32L01xxx/02xxx indicates STM32L011xx and STM32L021xx devices
STM32L031xx/041xx indicates STM32L031xx and STM32L041xx devices
STM32L05xxx/06xxx indicates STM32L051xx, STM32L052xx, STM32L053xx,
STM32L062xx, and STM32L063xx ultra-low power devices
STM32L07xxx/08xxx indicates STM32L071xx, STM32L072xx, STM32L073xx,
STM32L081xx, STM32L082xx, and STM32L083xx devices
L1 series:
STM32L1xxx6(8/B) indicates STM32L1xxV6T6, STM32L1xxV6H6, STM32L1xxR6T6,
STM32L1xxR6H6, STM32L1xxC6T6, STM32L1xxC6H6, STM32L1xxV8T6,
STM32L1xxV8H6, STM32L1xxR8T6, STM32L1xxR8H6, STM32L1xxC8T6,
STM32L1xxC8H6, STM32L1xxVBT6, STM32L1xxVBH6, STM32L1xxRBT6,
STM32L1xxRBH6, STM32L1xxCBT6, and STM32L1xxCBH6 ultra-low power devices
STM32L1xxx6(8/B)A indicates STM32L1xxV6T6-A, STM32L1xxV6H6-A,
STM32L1xxR6T6-A, STM32L1xxR6H6-A, STM32L1xxC6T6-A, STM32L1xxC6H6-A,
STM32L1xxV8T6-A, STM32L1xxV8H6-A, STM32L1xxR8T6-A, STM32L1xxR8H6-A,
STM32L1xxC8T6-A, STM32L1xxC8H6-A, STM32L1xxVBT6-A, STM32L1xxVBH6-A,
STM32L1xxRBT6-A, STM32L1xxRBH6-A, STM32L1xxCBT6-A, and
STM32L1xxCBH6-A ultra-low power devices
Note: nBoot0_SW means either nSWBoot0 or nBOOT0_SEL, depending upon the product.
Note: BOOT_LOCK implementation is product dependent. See the reference manual for more
details.
In addition to the patterns described above, the user can execute bootloader by performing
a jump to system memory from user code. Before jumping to bootloader:
• Disable all peripheral clocks
• Disable used PLL
• Disable interrupts
• Clear pending interrupts
System memory boot mode can be exited by getting out from bootloader activation
condition and generating hardware reset or using Go command to execute user code.
Note: When executing the Go command, the peripheral registers used by the bootloader are not
initialized to their default reset values before jumping to the user application. They must be
reconfigured in the user application if they are used. So, if the application uses the IWDG,
the IWDG prescaler value must be adapted to meet requirements (since the prescaler was
set to its maximum value). For some products, not all reset values are set. For more
information, refer to the known limitations detailed for each product bootloader version.
Note: On devices with dual bank boot, to jump to system memory from user code the user must
first remap the system memory bootloader at address 0x00000000 using SYSCFG register
(except for STM32F7 series), then jump to bootloader. For the STM32F7 series, the user
must disable nDBOOT and/or nDBANK features (in option bytes), then jump to bootloader.
For STM32L0 series, the jump to system memory from user code is not possible.
Note: For STM32 devices embedding bootloader using the DFU/CAN interface in which the
external clock source (HSE) is required for DFU/CAN operations, the detection of the HSE
value is done dynamically by the bootloader firmware and is based on the internal oscillator
clock (HSI, MSI). When (because of temperature variations or other conditions) the internal
oscillator precision is altered above the tolerance band (1% around the theoretical value),
the bootloader can calculate a wrong HSE frequency value. In this case, the bootloader
DFU/CAN interfaces can malfunction, or not work at all.
+V 1
R
RX 2 TX
RS232
Transceiver
STM32
UART Host TX RX Microcontroller
GND GND
MSv35098V1
1. A pull-up resistor must be added, if they are not connected on host side.
2. An RS232 transceiver must be connected to adapt the voltage level (3.3 to 12 V) between the STM32
device and the host.
Note: Typically V is 3.3 V, and R is 100 KΩ. These values depend upon the application and the
used hardware.
To use the DFU, connect the microcontroller USB interface to a USB host (such as a PC).
1
+V
10K
36K
1.5K
VBus
DP DP
STM32
USB Host
DM DM Microcontroller
GND GND
MS35037V1
1. This additional circuit permits to connect a pull-up resistor to DP pin using VBus when needed. Refer to
product section (table describing STM32 configuration in system memory boot mode) to know if an external
pull-up resistor must be connected to DP pin.
Note: V typically is 3.3 V. This value depends upon the application and the used hardware.
To use the I2C bootloader, connect the host (controller) and the desired I2Cx interface
(target) together via the data (SDA) and clock (SCL) pins. A 1.8 KΩ pull-up resistor must be
connected to both SDA and SCL lines.
1.8K
1.8K
SCL SCL
STM32
I2C Host
SDA SDA Microcontroller
GND GND
MS35038V1
Note: V is typically 3.3 V. This value depends upon the application and the used hardware.
To use the SPI bootloader, connect the host (master) and the desired SPIx interface (slave)
together via the MOSI, MISO, SCK and NSS pins. The NSS pin can be connected to GND.
A pull-down resistor must be connected to the SCK line.
NSS NSS
MOSI MOSI
MISO MISO
SPI host STM32
SCK SCK
GND GND
MS35039V2
Note: The resistor is typically 10 KΩ, its value depends upon the application and the used
hardware.
To use the CAN interface, the host must be connected to the RX and TX pins of the desired
CANx interface via CAN transceiver and a serial cable. A 120 Ω resistor must be added as
terminating resistor.
RX CAN_H TX
CAN CAN STM32
CAN Host
120
120
Transceiv Transceiv
TX er er RX Microcontroller
CAN_L
GND GND
MS35040V1
Note: When a bootloader firmware supports DFU, it is mandatory that no USB host is connected
to the USB peripheral during the selection phase of the other interfaces. After selection
phase, the user can plug a USB cable without impacting the selected bootloader execution,
except for commands generating a system reset.
It is recommended to keep the RX pins of unused bootloader interfaces (USART_RX,
SPI_MOSI, and CAN_RX, if present) at a known (low or high) level and keep the USB D+/D-
lines, if present, on the same level (low/high) at the startup of the bootloader (detection
phase). Leaving these pins floating during the detection phase can result in activation of
unused interfaces.
cannot be erased using Erase command. When writing in an OTP memory location,
make sure that the relative protection bit is not reset.
• For STM32 F2, F4, and F7 series the internal flash memory write operation format
depends on voltage range. By default write operations are allowed by one byte format
(half-word, word, and double-word operations are not allowed). To increase the speed
of write operation, the user must apply the adequate voltage range that allows write
operation by half-word, word or double-word and update this configuration on the fly by
the bootloader software through a virtual memory location. This memory location is not
physical but can be read and written using usual bootloader read/write operations
according to the protocol in use. This memory location contains four bytes, described in
Table 4. It can be accessed by 1, 2, 3, or 4 bytes. However, reserved bytes must
remain at their default values (0xFF), otherwise the request is NACK-ed.
Table 4. STM32 F2, F4, and F7 voltage range configuration using bootloader
Address Size Description
Table 5 lists the valid memory areas, depending upon the bootloader commands.
The devices using this mechanism are subject to software jitter (variable error of
baudrate calculation) that can reach up to ±5%. In this case, the host connecting to the
STM32 bootloader UART interface must support a ±5% deviation in baudrate.
The software jitter value is variable and different at each retry, so it is possible to use
multiple retry connections to overcome it. Connect and check for correct bootloader
answer, if the answer is not correct, reset the device and retry connection until the
correct answer is received. At this point, the rest of the communication is not impacted.
It is also possible to reduce the software jitter by reducing baudrate value (as an
example, use 56000 instead of 115200 bps).
Table 6 provides the maximum software jitter value for the 115200 bps baudrate. The
lower the baudrate, the lower the software jitter.
• Baudrate detection using UART auto-baudrate feature. Devices using this mechanism
do not present any software jitter.
STM32C011xx
STM32C031xx Auto-baudrate Not applicable
STM32C051xx USART1
STM32C051xx USART2 Software baudrate detection -2%
STM32C071xx USART1 Auto-baudrate Not applicable
STM32C071xx USART2 Software baudrate detection -2%
STM32C091xx/92xx USART1 Auto-baudrate Not applicable
STM32C091xx/92xx USART2/3 Software baudrate detection -2%
STM32F0 -1%
STM32F1 -3%
STM32F2 -5%
Software baudrate detection
STM32F3 -2%
STM32F4 -6%
STM32F7 -6%
STM32G05xxx/061xx USART1 Auto-baudrate Not applicable
STM32G05xxx/061xx USART2 -2%
STM32G07/8x USART3 Software baudrate detection
-4%
STM32G03/4x USART2
STM32G07/8x USART1/USART2
STM32G03/4x USART1
STM32G0B/Cxxx
Auto-baudrate Not applicable
STM32G4
STM32H5
STM32H7
STM32L0 -2%
STM32L1 Software baudrate detection -3%
STM32L4 -5%
STM32L5
STM32U031xx USART1/2 Auto-baudrate Not applicable
STM32U073/83xx USART1/2
STM32U073/83xx USART3 Software baudrate detection -2%
STM32U3
STM32U5
STM32WB
Auto-baudrate Not applicable
STM32WBA
STM32WB0
STM32WL
STM32C0 8 bytes
STM32F0 4 bytes
STM32F1 4 bytes
STM32F2 4 bytes
STM32F3 4 bytes
STM32F4 4 bytes
STM32F7 8 bytes
STM32G0 4 bytes
STM32G4 8 bytes
STM32H5 16 bytes
16 bytes (H7Rxx/H7Sxx devices)
STM32H7
8 bytes (all other devices)
STM32L0 8 bytes
STM32L1 8 bytes
STM32L4 8 bytes
STM32L5 16 bytes
STM32U0 8 bytes
STM32U3 8 bytes
STM32U5 16 bytes
STM32WB 8 bytes
STM32WBA 16 bytes
STM32WB0 4 bytes
STM32WL 8 bytes
Examples of alignment:
• 4 bytes: 0x0800 0014 is aligned and passes, 0x0800 0012 is not aligned and fails
• 8 bytes: 0x0800 0010 is aligned and passes, 0x0800 0014 is not aligned and fails
Note: On STM32F4 and STM32F7 it is possible to change the alignment constraint by writing in
the device feature space.
Application Application
ExitSecureMemory
3
2
ExitSecureMemory 3
2
Application Application
MS53655V2
Jump to the secure memory area with parameters (magic number and application address)
For more information regarding the option bytes configuration, see the reference manual.
For examples of functions that can be used to call ExitSecureMemory, see Appendix A.
For more details refer to Figure 7.
Jump to secure
memory address
Yes
Flash dual bank
Yes
Set securable Set securable
memory bit (Bank1) memory bit (Bank1)
Jump just after securable Set securable
memory area memory bit
MS51971V2
address address
Jump to user
address
1. The bootloader does not check the integrity of the user address, it is up to the user to ensure the validity of the address to
jump to.
Jump to secure
memory address
Execute
MS56536V1
ExitSecureMemory
v1.0
MS56536V1
STM32G07xxx/08xxx 0x1FFF6800
STM32G03xxx/04xxx 0x1FFF1E00
STM32G0
STM32G0Bxxx/0Cxxx 0x1FFF6800
STM32G05xxx/061xx 0x1FFF6800
STM32G47xxx/48xxx 0x1FFF6800 Not available V1.0
STM32G4 STM32G431xx/441xx 0x1FFF6800
STM32G491xx/4A1xx 0x1FFF6800
STM32C011xx 0x1FFF1600
STM32C031xx 0x1FFF1600
STM32C0 STM32C051xx 0x1FFF2E00 0x1FFF2F8C
STM32C071xx 0x1FFF1600 0x1FFF618C V1.1 (0x11)
STM32C091xx/92xx 0x1FFF3E00 0x1FFF3F8C
STM32U031xx 0x1FFF3500 0x1FFF368C
STM32U0 V1.1 (0x11)
STM32U073xx/83xx 0x1FFF6000 0x1FFF618C
BL SFSP Secure
Non secure
ExitSecureMemory BL Non secure
MS56765V1
BL_V1 BL_V2
Jump SFSP
Boot
Bootloader Bootloader
MS56766V1
BL_V1 BL_V2
Jump SFSP
Boot
Bootloader Bootloader
MS56767V1
TZEN disabled TZEN enabled
Jump SFSP
Bootloader
MS56771V1
5 STM32C011xx devices
RCC HSI enabled The system clock frequency is 24 MHz (no PLL)
3.5 Kbytes, starting from address 0x20000000, are
RAM -
used by the bootloader firmware
6 Kbytes, starting from address 0x1FFF0000 contain
Common to all System memory -
the bootloader firmware
The IWDG prescaler is configured to its maximum
value. It is periodically refreshed to prevent watchdog
IWDG -
reset if the hardware IWDG option was previously
enabled by the user.
Securable memory The address to jump to for the securable memory area
- -
area is 0x1FFF1600
Once initialized, the USART1 configuration is 8 bits,
USART1 Enabled
even parity, and one stop bit.
PA10 pin: USART1 in reception mode. Used in input
USART1 USART1_RX pin Input
pull-up mode.
PA9 pin: USART1 in transmission mode. Used in
USART1_TX pin Output
alternate push-pull, pull-up mode.
The I2C1 configuration is:
– I2C speed: up to 1 MHz
– 7-bit address
I2C1 Enabled – Target mode
I2C1 – Analog filter ON
– Target 7-bit address: 0b1100100x (x = 0 for write and
x = 1 for read)
I2C1_SCL pin PB6 pin: clock line is used in open-drain pull-up mode
Input/output
I2C1_SDA pin PB7 pin: data line is used in open-drain pull-up mode
Note: On WLCSP12, SO8N, TSSOP20, and UFQFN20 packages USART1 PA9/PA10 IOs are
remapped on PA11/PA12.
System reset
Configure USARTx
Configure I2Cx
No
No
Execute Execute
BL_I2C_Loop BL_USART_Loop
for I2Cx for USARTx
MS56841V1
6 STM32C031xx devices
RCC HSI enabled The system clock frequency is 24 MHz (no PLL)
3.5 Kbytes, starting from address 0x20000000, are
RAM -
used by the bootloader firmware.
6 Kbytes, starting from address 0x1FFF0000,
Common to all System memory -
contain the bootloader firmware.
The IWDG prescaler is configured to its maximum
value. It is periodically refreshed to prevent
IWDG -
watchdog reset if the hardware IWDG option was
previously enabled by the user.
Securable memory The address to jump to for the securable memory
- -
area area is 0x1FFF1600
Once initialized, the USART1 configuration is 8 bits,
USART1 Enabled
even parity, and one stop bit.
PA10 pin: USART1 in reception mode. Used in
USART1 USART1_RX pin Input
input pull-up mode.
PA9 pin: USART1 in transmission mode. Used in
USART1_TX pin Output
alternate push-pull, pull-up mode.
The I2C1 configuration is:
– I2C speed: up to 1 MHz
– 7-bit address
I2C1 Enabled – Target mode
– Analog filter ON
I2C1 – Target 7-bit address: 0b1100011x (x = 0 for write
and x = 1 for read)
PB6 pin: clock line is used in open-drain no pull
I2C1_SCL pin
mode.
Input/output
PB7 pin: data line is used in open-drain no pull
I2C1_SDA pin
mode.
Note: On TSSOP20 and UFQFN28 packages USART1 PA9/PA10 IOs are remapped on
PA11/PA12.
System reset
Configure USARTx
Configure I2Cx
No
No
Execute Execute
BL_I2C_Loop BL_USART_Loop
for I2Cx for USARTx
MS56841V1
7 STM32C051xx devices
System reset
Configure USARTx
Configure I2Cx
No
No Configure
Execute
BL_I2C_Loop USARTx TX
for I2Cx
Execute
BL_USART_Loop
for USARTx
MS52813V2
8 STM32C071xx devices
1. SPI Tx (MISO) is handled by DMA. On the bootloader start-up after SPI initialization as soon as the bit DMATx enable on
SPI CR2 register is set to 0x1, the MISO line is set to 3.3 V.
System Reset
Or JumpToBL
Disable all
0x7F Execute
De-Init system interrupt sources
detected on Yes BL_USART_Loop
Configure System clock and other
USART Tx for USARTx
to 24 MHz with HSI interfaces clocks
and HSI48 for USB
No
Configure No
USB FS device
Disable all
SPIx detects Execute
interrupt sources
Synchro Yes BL_SPI_Loop
No and other
mechanism for SPIx
Configure USARTx interfaces clocks
No
Configure SPIx
9 STM32C091xx/92xx devices
System Reset
Or JumpToBL
DeInitialize system
No
System Init
(Clock, GPIOs,
IWDG, SysTick)
Disable all interrupt Exexute
FDCAN frame
Yes sources and other BL_FDCAN_Loop
detected
interfaces clocks for FDCANx
Configure USARTx
No
No
Configure FDCANx
MS56838V1
10 STM32F03xx4/6 devices
The system clock is derived from the embedded internal high-speed RC. No external quartz
is required for the bootloader execution.
Note: After the STM32F03xx4/6 device has booted in bootloader mode, serial wire debug (SWD)
communication is no longer possible until the system is reset. This is because the SWD
uses the PA14 pin (SWCLK), already used by the bootloader (USART1_TX).
System Reset
0x7F received on
USARTx
no
yes
Disable all
interrupt sources
Configure
USARTx
Execute
BL_USART_Loop
for USARTx
MS35015V1
11 STM32F030xC devices
Note: After the devices have booted in bootloader mode using USART2, the serial wire debug
(SWD) communication is no more possible until the system is reset, because SWD uses
PA14 pin (SWCLK), already used by the bootloader (USART2_RX).
The system clock is derived from the embedded internal high-speed RC. No external quartz
is required for the bootloader execution.
System Reset
Configure I2Cx
yes
MSv36789V1
Table 24. STM32F05xxx and STM32F030x8 devices configuration in system memory boot mode
Bootloader Feature/Peripheral State Comment
The system clock is derived from the embedded internal high-speed RC. No external quartz
is required for the bootloader execution.
Note: After the STM32F05xxx and STM32F030x8 devices have booted in bootloader mode, the
serial wire debug (SWD) communication is no more possible until the system is reset,
because SWD uses PA14 pin (SWCLK), already used by the bootloader (USART2_TX).
System Reset
0x7F received on
USARTx
no
yes
Disable all
interrupt sources
Configure
USARTx
Execute
BL_USART_Loop
for USARTx
MS35014V1
13 STM32F04xxx devices
Note: After the devices have booted in bootloader mode using USART2, the serial wire debug
(SWD) communication is no more possible until the system is reset, because SWD uses
PA14 pin (SWCLK), already used by the bootloader (USART2_RX).
The system clock is derived from the embedded internal high-speed RC. No external quartz
is required for the bootloader execution.
Note: Due to empty check mechanism present on these products, it is not possible to jump from
user code to system bootloader. Such jump results in a jump back to user flash memory
space. If the first four bytes of User flash (at 0x0800 0000) are empty at the moment of jump
(i.e. erase first sector before jump or execute code from SRAM while flash is empty), then
system bootloader is executed when jumped to.
System Reset
Configure I2Cx
0x7F received
yes
on USARTx
yes
no
Disable all interrupt
Disable all interrupt
sources and other
sources and other
I2Cx Address
Detected yes interfaces clock’s interfaces clock’s
Disable other
no interfaces clock’s Execute Configure
no BL_I2C_Loop for USARTx
I2Cx
USB
Detected Execute DFU
bootloader using USB Execute
interrupts BL_USART_Loop
for USARTx
MS35025V1
V10.0 Initial bootloader version At bootloader startup, the HSITRIM value is set to 0 (in
HSITRIM bits on RCC_CR register) instead of default
value (16), as a consequence a deviation is generated
Add dynamic support of in crystal measurement.
USART/USB interfaces on For better results, use the smallest supported crystal
V10.1
PA11/12 IOs for small value (4 MHz).
packages.
PA13 is set in input pull-up mode even if not used by
the bootloader.
14 STM32F070x6 devices
Note: If HSI deviation exceeds 1% the bootloader might not function correctly.
Note: After the STM32F070x6 devices have booted in bootloader mode using USART2, the serial
wire debug (SWD) communication is no more possible until the system is reset, because
SWD uses PA14 pin (SWCLK), already used by the bootloader (USART2_RX).
The bootloader has two cases of operation depending on the presence of the external clock
(HSE) at bootloader startup:
• If HSE is present and has a value of 24, 18, 16, 12, 8, 6, or 4 MHz, the system clock is
configured to 48 MHz with HSE as clock source. The DFU interface, USART1,
USART2, and I2C1 are functional and can be used to communicate with the bootloader
device.
• If HSE is not present, the HSI is kept as default clock source and only USART1,
USART2, and I2C1 are functional.
The external clock (HSE) must be kept if it is connected at bootloader startup, because it is
used as system clock source.
Note: Due to empty check mechanism present on this product, it is not possible to jump from user
code to system bootloader. Such jump results in a jump back to user flash space, but if the
first four bytes of user flash (at 0x0800 0000) are empty at the moment of jump (i.e. erase
first sector before jump or execute code from SRAM while flash is empty), then system
bootloader is executed when jumped to.
System Reset
yes
Configure USB
Configure I2Cx
0x7F received
yes
on USARTx
yes
no
Disable all interrupt
sources and other
interfaces clock’s
I2Cx Address
Detected yes
Disable all interrupt
Disable other sources and other Configure
interfaces clock’s interfaces clock’s USARTx
no
no
MSv36794V1
V10.2 Initial bootloader version At bootloader startup, the HSITRIM value is set to
0 (in HSITRIM bits on RCC_CR register) instead
of default value (16), as a consequence a
Clock configuration fixed deviation is generated in crystal measurement.
V10.3
to HSI 8 MHz For better results, use the smallest supported
crystal value (4 MHz).
15 STM32F070xB devices
Note: If HSI deviation exceeds 1% the bootloader might not function correctly.
Note: After the devices have booted in bootloader mode using USART2, the serial wire debug
(SWD) communication is no more possible until the system is reset, because SWD uses
PA14 pin (SWCLK), already used by the bootloader (USART2_RX).
The bootloader has two cases of operation depending on the presence of the external clock
(HSE) at bootloader startup:
• If HSE is present and has a value of 24, 18, 16, 12, 8, 6, or 4 MHz, the system clock is
configured to 48 MHz with HSE as clock source. The DFU interface, USART1,
USART2, and I2C1 are functional and can be used to communicate with the bootloader
device.
• If HSE is not present, the HSI is kept as default clock source and only USART1,
USART2, and I2C1 are functional.
The external clock (HSE) must be kept if it is connected at bootloader startup, because it is
used as system clock source.
System Reset
yes
Configure USB
Configure I2Cx
0x7F received
yes
on USARTx
yes
no
Disable all interrupt
sources and other
interfaces clock’s
I2Cx Address
Detected yes
Disable all interrupt
Disable other sources and other Configure
interfaces clock’s interfaces clock’s USARTx
no
no
MSv36795V1
V10.2 Initial bootloader version At bootloader startup, the HSITRIM value is set to 0 (in
HSITRIM bits on RCC_CR register) instead of default
value (16), as a consequence a deviation is generated
Clock configuration fixed in crystal measurement. For better results, use the
V10.3 smallest supported crystal value (4 MHz).
to HSI 8 MHz
PA13 is set in alternate push-pull mode even if not
used by the bootloader.
16 STM32F071xx/072xx devices
Note: After the devices have booted in bootloader mode using USART2, the serial wire debug
(SWD) communication is no more possible until the system is reset, because SWD uses
PA14 pin (SWCLK), already used by the bootloader (USART2_RX).
The system clock is derived from the embedded internal high-speed RC. No external quartz
is required for the bootloader execution.
System Reset
Configure I2Cx
0x7F received on
yes
USARTx
yes
no
Disable all interrupt
Disable all interrupt
sources and other
sources and other
I2Cx Address
Detected yes interfaces clock’s interfaces clock’s
Disable other
no interfaces clock’s Execute Configure
no BL_I2C_Loop for USARTx
I2Cx
USB
Detected Execute DFU
bootloader using USB Execute
interrupts BL_USART_Loop
for USARTx
MS35026V1
17 STM32F09xxx devices
Note: After the devices have booted in bootloader mode using USART2, the serial wire debug
(SWD) communication is no longer possible until the system is reset, because SWD uses
PA14 pin (SWCLK), already used by the bootloader (USART2_RX).
The system clock is derived from the embedded internal high-speed RC. No external quartz
is required for the bootloader execution.
System Reset
Configure I2Cx
yes
MSv36789V1
18 STM32F10xxx devices
RCC HSI enabled The system clock frequency is 24 MHz using the PLL.
512 byte starting from address 0x20000000, are used
RAM -
by the bootloader firmware.
2 Kbytes, starting from address 0x1FFFF000 contain
Common to all System memory -
the bootloader firmware.
The IWDG prescaler is configured to its maximum value
and is periodically refreshed to prevent watchdog reset
IWDG -
(if the hardware IWDG option was previously enabled
by the user).
Once initialized, the USART1 configuration is 8 bits,
USART1 Enabled
even parity, and one stop bit.
PA10 pin: USART1 in reception mode. Used in input no
USART1 USART1_RX pin Input
pull mode.
PA9 pin: USART1 in transmission mode. Used in
USART1_TX pin Output push-pull
alternate push-pull, pull-up mode.
Used to automatically detect the serial baud rate from
USARTx SysTick timer Enabled
the host.
The system clock is derived from the embedded internal high-speed RC. No external quartz
is required for the bootloader execution.
System Reset
0x7F received on
USARTx
No
Yes
Disable all
interrupt sources
Configure
USARTx
Execute
BL_USART_Loop
for USARTx
MS35004V1
Note: The bootloader ID format is applied to all STM32 devices except the STM32F1xx devices.
The bootloader version for the STM32F1xx applies only to the embedded device’s
bootloader version and not to its supported protocols.
19 STM32F105xx/107xx devices
The system clock is derived from the embedded internal high-speed RC for USARTx
bootloader. This internal clock is used also for DFU and CAN bootloaders, but only for the
selection phase. An external clock (8, 14.7456, or 25 MHz) is required for DFU and CAN
bootloader execution after the selection phase.
System Reset
Configure USB
USB cable
yes
Detected
no yes
Disable all
interrupt sources HSE= 8MHz,
no 0x7F received on
USARTx 14.7456MHz or
Configure 25 MHz
USARTx
no
yes
Frame detected on Execute
CANx BL_USART_Loop
Reconfigure System
for USARTx
clock to 48MHz and
yes USB clock to 48 MHz
Generate System
yes
reset
Reconfigure System
clock to 48MHz
Disable all
interrupt sources
Configure CAN
Execute
BL_CAN_Loop for
CANx
MS35005V1
Note: The bootloader ID format is applied to all STM32 devices except the STM32F1xx products.
The version for STM32F1xx applies only to the embedded device’s bootloader version and
not to its supported protocols.
The DFU version can be read through the bcdDevice field of the DFU Device Descriptor:
• V2.1 in bootloader V2.1
• V2.2 in bootloader V2.2.
Workaround
• For 64-pin packages
None. The bootloader cannot be used.
• For 100-pin packages
Depending on the used peripheral, the pins for the unused peripherals must be kept at
a high level during the bootloader activation phase as described below:
– If USART1 is used to connect to the bootloader, PD6 and PB5 must be kept at a
high level.
– If USART2 is used to connect to the bootloader, PA10, PB5, PA11, and PA12 must
be kept at a high level.
– If CAN2 is used to connect to the bootloader, PA10, PD6, PA11, and PA12 must be
kept at a high level.
– If DFU is used to connect to the bootloader, PA10, PB5, and PD6 must be kept at
a high level.
Note: This limitation applies only to STM32F105xx and STM32F107xx devices with a date code
lower than 937. STM32F105xx and STM32F107xx devices with a date code higher or equal
to 937 are not impacted. See STM32F105xx and STM32F107xx datasheets for where to
find the date code on the device marking.
Workaround
None.
Workaround
None.
The system clock is derived from the embedded internal high-speed RC. No external quartz
is required for the bootloader execution.
System Reset
yes
If Value
@0x08080000 is
yes
within int. SRAM
address Jump to user code
in Bank2
no no
If Value
@0x08000000 is
yes
within int. SRAM
address Jump to user code
in Bank1
no
Disable all
interrupt sources
no
MS35006V1
Note: The bootloader ID format is applied to all STM32 devices families except the STM32F1xx
family. The bootloader version for the STM32F1xx applies only to the embedded device
bootloader version and not to its supported protocols.
21 STM32F2xxxx devices
The system clock is derived from the embedded internal high-speed RC. No external quartz
is required for the bootloader code.
System Reset
0x7F received on
USARTx
no
yes
Disable all
interrupt sources
Configure
USARTx
Execute
BL_USART_Loop
for USARTx
MS35010V1
The system clock is derived from the embedded internal high-speed RC for USARTx. This
internal clock is also used for CAN and DFU (USB FS device), but only for the selection
phase. An external clock multiple of 1 MHz (between 4 and 26 MHz) is required for CAN
and DFU execution after the selection phase.
System Reset
Configure
Configure USB OTG FS
USARTx
device
Execute
0x7F received on BL_USART_Loop
USARTx for USARTx
yes
no
yes
Execute
Execute DFU BL_CAN_Loop for
bootloader using USB CANx
interrupts
MS35011V1
22 STM32F301xx/302x4(6/8) devices
The bootloader has two cases of operation, depending upon the presence of the external
clock (HSE) at bootloader startup:
• If HSE is present and has a value of 24, 18, 16, 12, 9, 8, 6, 4, or 3 MHz, the system
clock is configured to 48 MHz with HSE as clock source. The DFU interface, USART1
and USART2 are functional and can be used to communicate with the bootloader
device.
• If HSE is not present, the HSI is kept as default clock source, and only USART1 and
USART2 are functional.
The external clock (HSE) must be kept if it is connected at bootloader startup, because it is
used as system clock source.
System Reset
HSE= 24,
18, 16, 12, 9, 8, 6, 4, no
3 MHz ?
Yes
yes
USB cable
Detected & USB
configured Disable all interrupt
yes
sources and other
interfaces clock’s Disable other
no interfaces clock’s
Configure
USARTx
0x7F received on
Execute DFU
USARTx
no Execute bootloader using USB
BL_USART_Loop interrupts
for USARTx
MS35027V1
23 STM32F302xB(C)/303xB(C) devices
The bootloader has two cases of operation depending on the presence of the external clock
(HSE) at bootloader startup:
• If HSE is present and has a value of 24, 18, 16, 12, 9, 8, 6, 4 or 3 MHz, the system
clock is configured to 48 MHz with HSE as clock source. The DFU interface, USART1
and USART2 are functional and can be used to communicate with the bootloader
device.
• If HSE is not present, the HSI is kept as default clock source, and only USART1 and
USART2 are functional.
The external clock (HSE) must be kept if it is connected at bootloader startup, because it is
used as system clock source.
System Reset
yes
Configure USB
yes
USB configured
and cable Detected yes Execute DFU
Disable all bootloader using USB
interrupt sources interrupts
no
Configure
0x7F received USARTx
no on USARTx
Execute
BL_USART_Loop
for USARTx
MS35016V3
24 STM32F302xD(E)/303xD(E) devices
The bootloader has two cases of operation depending on the presence of the external clock
(HSE) at bootloader startup:
• If HSE is present and has a value of 24, 18, 16, 12, 9, 8, 6, 4 or 3 MHz, the system
clock is configured to 48 MHz with HSE as clock source. The DFU interface, USART1
and USART2 are functional and can be used to communicate with the bootloader
device.
• If HSE is not present, the HSI is kept as default clock source, and only USART1 and
USART2 are functional.
The external clock (HSE) must be kept if it is connected at bootloader startup, because it is
used as system clock source.
System Reset
yes
Reconfigure System clock to
48 MHz using HSE
System Init (Clock, GPIOs,
IWDG, SysTick)
USB cable
detected & USB yes
configured yes
Disable other
Configure USARTx interfaces clock’s
0x7F received on
no USARTx
Execute Execute DFU
BL_USART_Loop for bootloader using USB
USARTx interrupts
MSv36790V1
25 STM32F303x4(6/8)/334xx/328xx devices
The system clock is derived from the embedded internal high-speed RC. No external quartz
is required for the bootloader execution.
System Reset
Disable all
interrupt sources
Configure I2Cx
yes
I2C Address
detected yes Execute
BL_I2C_Loop for
Configure
I2Cx
USARTx
no
Execute
0x7F received on BL_USART_Loop
USARTx for USARTx
no
MS35029V2
26 STM32F318xx devices
The system clock is derived from the embedded internal high-speed RC. No external quartz
is required for the bootloader execution.
System Reset
Disable all
interrupt sources
Configure I2Cx
yes
I2C Address
detected yes Execute
BL_I2C_Loop for
Configure
I2Cx
USARTx
no
Execute
0x7F received on BL_USART_Loop
USARTx for USARTx
no
MS35028V2
27 STM32F358xx devices
RCC HSI enabled The system clock frequency is 8 MHz using the HSI.
5 Kbytes, starting from address 0x20000000, are used by
RAM -
the bootloader firmware.
8 Kbytes, starting from address 0x1FFFD800, contains
Common to all System memory -
the bootloader firmware.
The IWDG prescaler is configured to its maximum value
and is periodically refreshed to prevent watchdog reset (if
IWDG -
the hardware IWDG option was previously enabled by the
user). Window feature is disabled.
Once initialized, the USART1 configuration is 8 bits, even
USART1 Enabled
parity, and one stop bit.
PA10 pin: USART1 in reception mode. Used in alternate
USART1 USART1_RX pin Input
push-pull, pull-up mode.
PA9 pin: USART1 in transmission mode. Used in
USART1_TX pin Output
alternate push-pull, pull-up mode.
Once initialized, the USART2 configuration is 8 bits, even
USART2 Enabled parity, and one stop bit. The USART2 uses its remapped
pins.
USART2 PD6 pin: USART2 in reception mode. Used in alternate
USART2_RX pin Input
push-pull, pull-up mode.
PD5 pin: USART2 in transmission mode. Used in
USART2_TX pin Output
alternate push-pull, pull-up mode.
Used to automatically detect the serial baud rate from the
USARTx SysTick timer Enabled
host for USARTx bootloader.
The I2C1 configuration is:
– I2C speed: up to 400 kHz
– 7-bit address
I2C1 Enabled – Target mode
I2C1 – Analog filter ON
– Target 7-bit address: 0b0110111x (x = 0 for write and
x = 1 for read)
I2C1_SCL pin PB6 pin: clock line is used in open-drain no pull mode.
Input/output
I2C1_SDA pin PB7 pin: data line is used in open-drain no pull mode.
The system clock is derived from the embedded internal high-speed RC. No external quartz
is required for the bootloader execution.
System Reset
Disable all
interrupt sources
Configure I2Cx
yes
I2C Address
detected yes Execute
BL_I2C_Loop for
Configure
I2Cx
USARTx
no
Execute
0x7F received BL_USART_Loop
on USARTx for USARTx
no
MS35019V2
28 STM32F373xx devices
Common to all The CSS interrupt is enabled for the DFU. Any failure (or
-
removal) of the external clock generates system reset.
5 Kbytes, starting from address 0x20000000, are used by
RAM -
the bootloader firmware.
8 Kbytes, starting from address 0x1FFFD800, contains the
System memory -
bootloader firmware
The IWDG prescaler is configured to its maximum value and
IWDG - is periodically refreshed to prevent watchdog reset (if the
hardware IWDG option was previously enabled by the user).
Once initialized, the USART1 configuration is 8 bits, even
USART1 Enabled
parity, and one stop bit.
PA10 pin: USART1 in reception mode. Used in alternate
USART1 USART1_RX pin Input
push-pull, pull-up mode.
PA9 pin: USART1 in transmission mode. Used in alternate
USART1_TX pin Output
push-pull, pull-up mode.
Once initialized, the USART2 configuration is 8 bits, even
USART2 Enabled parity, and one stop bit. The USART2 uses its remapped
pins.
USART2 PD6 pin: USART2 in reception mode. Used in alternate
USART2_RX pin Input
push-pull, pull-up mode.
PD5 pin: USART2 in transmission mode. Used in alternate
USART2_TX pin Output
push-pull, pull-up mode.
Used to automatically detect the serial baud rate from the
USARTx SysTick timer Enabled
host for USARTx bootloader.
There are two operation modes, depending upon the presence of the external clock (HSE)
at bootloader startup:
• If HSE is present and has a value of 24, 18, 16, 12, 9, 8, 6, 4, or 3 MHz, the system
clock is configured to 48 MHz with HSE as clock source. The DFU interface, USART1
and USART2 are functional and can be used to communicate with the bootloader.
• If HSE is not present, the HSI is kept as default clock source, and only USART1 and
USART2 are functional.
Note: The external clock (HSE) must be kept if it is connected at bootloader startup, because it is
used as system clock source.
System Reset
HSE = 24,
18, 16, 12, 9, 8, 6, 4,
3 MHz
no
yes
Configure USB
yes
USB configured
and cable Detected Execute DFU
yes Disable all bootloader using USB
interrupt sources interrupts
no
Configure
0x7F received USARTx
no on USARTx
Execute
BL_USART_Loop
for USARTx
MS35016V4
29 STM32F378xx devices
RCC HSI enabled The system clock frequency is 8 MHz using the HSI.
4 Kbytes, starting from address 0x20000000, are used by
RAM -
the bootloader firmware.
8 Kbytes, starting from address 0x1FFFD800, contains
Common to all System memory -
the bootloader firmware
The IWDG prescaler is configured to its maximum value
and is periodically refreshed to prevent watchdog reset (if
IWDG -
the hardware IWDG option was previously enabled by the
user). Window feature is disabled.
Once initialized, the USART1 configuration is 8 bits, even
USART1 Enabled
parity, and one stop bit
PA10 pin: USART1 in reception mode. Used in alternate
USART1 USART1_RX pin Input
push-pull, pull-up mode.
PA9 pin: USART1 in transmission mode. Used in
USART1_TX pin Output
alternate push-pull, pull-up mode.
Once initialized, the USART2 configuration is 8 bits, even
USART2 Enabled parity, and one stop bit. The USART2 uses its remapped
pins.
USART2 PD6 pin: USART2 in reception mode. Used in alternate
USART2_RX pin Input
push-pull, pull-up mode.
PD5 pin: USART2 in transmission mode. Used in
USART2_TX pin Output
alternate push-pull, pull-up mode.
Used to automatically detect the serial baud rate from the
USARTx SysTick timer Enabled
host for USARTx bootloader.
The I2C1 configuration is:
– I2C speed: up to 400 kHz
– 7-bit address
I2C1 Enabled – Target mode
I2C1 – Analog filter ON
– Target 7-bit address: 0b0110111x (x = 0 for write and x
= 1 for read).
I2C1_SCL pin PB6 pin: clock line is used in open-drain no pull mode.
Input/output
I2C1_SDA pin PB7 pin: data line is used in open-drain no pull mode.
The system clock is derived from the embedded internal high-speed RC. No external quartz
is required for the bootloader execution.
System Reset
Disable all
interrupt sources
Configure I2Cx
yes
I2C Address
detected yes Execute
BL_I2C_Loop for
Configure
I2Cx
USARTx
no
Execute
0x7F received BL_USART_Loop
on USARTx for USARTx
no
MS35018V2
30 STM32F398xx devices
The system clock is derived from the embedded internal high-speed RC for all bootloader
interfaces. No external quartz is required for bootloader operations.
System Reset
Disable all
interrupt sources
Configure I2Cx
MSv36791V1
31 STM32F40xxx/41xxx devices
The system clock is derived from the embedded internal high-speed RC for USARTx. This
internal clock is also used for CAN and DFU (USB FS device), but only for the selection
phase. An external clock multiple of 1 MHz (between 4 and 26 MHz) is required for CAN
and DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystals (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
System Reset
Configure
Configure USB OTG FS
USARTx
device
Execute
0x7F received on BL_USART_Loop
USARTx for USARTx
yes
no
yes
Execute
Execute DFU BL_CAN_Loop for
bootloader using USB CANx
interrupts
MS35012V3
The system clock is derived from the embedded internal high-speed RC for USARTx, I2Cx,
and SPIx bootloaders. This internal clock is also used for CAN and DFU (USB FS device),
but only for the selection phase. An external clock multiple of 1 MHz (between 4 and
26 MHz) is required for CAN and DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
System Reset
Execute
0x7F received on
USARTx BL_USART_Loo
p for USARTx
no yes
Frame detected
on CANx no HSE detected
yes
no HSE detected no
Generate System
yes
Yes reset
USB cable
Detected
Reconfigure System
clock to 60MHz and Disable all
Disable all interrupt USB clock to 48 MHz interrupt sources
no sources
no
yes
Reconfigure System
Execute DFU clock to 60MHz
Execute
I2Cx Address BL_I2C_Loop for bootloader using
Detected I2Cx USB interrupts
Configure CAN
yes
no Execute
Disable all BL_CAN_Loop for
interrupt sources CANx
SPIx detects
Synchro
mechanism Execute
BL_SPI_Loop for
SPIx
MS35012V2
This bootloader is an updated – For the USART interface, two consecutive NACKs (instead of
version of bootloader v3.1. 1 NACK) are sent when a Read Memory or Write Memory
command is sent and the RDP level is active.
This new version of bootloader
supports I2C1, I2C2, I2C3, SPI1 – For the CAN interface, the Write Unprotect command is not
and SPI2 interfaces. functional. Use Write Memory command and write directly to
V9.0
the option bytes in order to disable the write protection.
The RAM used by this bootloader is
increased from 8 to 12 Kb. After executing Go command (jump to user code) the
bootloader resets AHB1ENR value to 0x0000 0000 and thus
The ID of this bootloader is 0x90.
CCM RAM, when present, is not active (must be re-enabled by
The connection time is increased. user code at startup)
This bootloader is an updated
version of bootloader v9.0 that will
be populated in all packages even
V9.1 the one embedding the V3.1 None
bootloader version.
It contains fixes of the known
limitations of the V9.0
32 STM32F401xB(C) devices
The system clock is derived from the embedded internal high-speed RC for USARTx, I2Cx,
and SPIx bootloaders. This internal clock is also used for CAN and DFU (USB FS device),
but only for the selection phase. An external clock, multiple of 1 MHz (between 4 and
26 MHz), is required for CAN and DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
System Reset
no
33 STM32F401xD(E) devices
SPI1 PA7 pin: slave data input line, used in push-pull, pull-down
SPI1_MOSI pin Input
mode
PA6 pin: slave data output line, used in push-pull, pull-
SPI1_MISO pin Output
down mode
PA5 pin: slave clock line, used in push-pull, pull-down
SPI1_SCK pin Input
mode
PA4 pin: slave chip select pin used in push-pull, pull-down
SPI1_NSS pin Input
mode.
SPI2 PB15 pin: slave data input line, used in push-pull, pull-
SPI2_MOSI pin Input
down mode
PB14 pin: slave data output line, used in push-pull, pull-
SPI2_MISO pin Output
down mode
PB13 pin: slave clock line, used in push-pull, pull-down
SPI2_SCK pin Input
mode
PB12 pin: slave chip select pin used in push-pull, pull-
SPI2_NSS pin Input
down mode.
The SPI3 configuration is:
– Slave mode
– Full Duplex
SPI3 Enabled
– 8-bit MSB
– Speed up to 8 MHz
– Polarity: CPOL low, CPHA low, NSS hardware.
SPI3 PC12 pin: slave data input line, used in push-pull, pull-
SPI3_MOSI pin Input
down mode
PC11 pin: slave data output line, used in push-pull, pull-
SPI3_MISO pin Output
down mode
PC10 pin: slave clock line, used in push-pull, pull-down
SPI3_SCK pin Input
mode
PA15 pin: slave chip select pin used in push-pull, pull-down
SPI3_NSS pin Input
mode.
USB Enabled USB OTG FS configured in forced device mode
PA11: USB DM line. Used in alternate push-pull, no pull
USB_DM pin
mode.
Input/output PA12: USB DP line. Used in alternate push-pull, no pull
DFU USB_DP pin mode.
No external pull-up resistor is required
This timer is used to determine the value of the HSE. Once
TIM11 Enabled the HSE frequency is determined, the system clock is
configured to 60 MHz using PLL and HSE.
The system clock is derived from the embedded internal high-speed RC for USARTx, I2Cx,
and SPIx bootloaders. This internal clock is also used for DFU (USB FS device), but only for
the selection phase. An external clock multiple of 1 MHz (between 4 and 26 MHz) is
required for DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
System Reset
no
34 STM32F410xx devices
The system clock is derived from the embedded internal high-speed RC for all bootloader
interfaces. No external quartz is required for bootloader operations.
System Reset
Configure I2Cx
Configure SPIx
0x7F received
yes
on USARTx
no
I2Cx Address
yes
Detected
Configure USARTx
SPIx detects Synchro yes
mechanism
MSv38431V2
35 STM32F411xx devices
Used to automatically detect the serial baud rate from the host
USARTx SysTick timer Enabled
for USARTx.
The I2C1 configuration is:
– I2C speed: up to 400 kHz
– 7-bit address
I2C1 Enabled – Target mode
I2C1 – Analog filter ON
– Target 7-bit address: 0b0111001x (x = 0 for write and x = 1 for
read)
I2C1_SCL pin PB6 pin: clock line is used in open-drain no pull mode.
Input/output
I2C1_SDA pin PB7 pin: data line is used in open-drain no pull mode.
The I2C2 configuration is:
– I2C speed: up to 400 kHz
– 7-bit address
I2C2 Enabled – Target mode
I2C2 – Analog filter ON
– Target 7-bit address: 0b0111001x (x = 0 for write and x = 1 for
read)
I2C2_SCL pin PB10 pin: clock line is used in open-drain no pull mode.
Input/output
I2C2_SDA pin PB3 pin: data line is used in open-drain no pull mode.
The I2C3 configuration is:
– I2C speed: up to 400 kHz
– 7-bit address
I2C3 Enabled – Target mode
I2C3 – Analog filter ON
– Target 7-bit address: 0b0111001x (x = 0 for write and x = 1 for
read)
I2C3_SCL pin PA8 pin: clock line is used in open-drain no pull mode.
Input/output
I2C3_SDA pin PB4 pin: data line is used in open-drain no pull mode.
The SPI1 configuration is:
– Slave mode
– Full Duplex
SPI1 Enabled
– 8-bit MSB
– Speed up to 8 MHz
– Polarity: CPOL low, CPHA low, NSS hardware
SPI1 PA7 pin: slave data input line, used in push-pull, pull-down
SPI1_MOSI pin Input
mode
PA6 pin: slave data output line, used in push-pull, pull-down
SPI1_MISO pin Output
mode
SPI1_SCK pin Input PA5 pin: slave clock line, used in push-pull, pull-down mode
PA4 pin: slave chip select pin used in push-pull, pull-down
SPI1_NSS pin Input
mode.
The system clock is derived from the embedded internal high-speed RC for USARTx, I2Cx
I2Cx, and SPIx bootloaders. This internal clock is also used for DFU (USB FS device), but
only for the selection phase. An external clock multiple of 1 MHz (between 4 and 26 MHz) is
required for DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
System Reset
no
36 STM32F412xx devices
The system clock is derived from the embedded internal high-speed RC for USARTx and
I2Cx bootloaders. This internal clock is also used for CAN and DFU (USB FS device), but
only for the selection phase. An external clock multiple of 1 MHz (between 4 and 26 MHz) is
required for CAN and DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
System Reset
no
yes
I2Cx Address
Detected
no
HSE detected no no HSE detected
no Configure CANx
Execute DFU
bootloader using USB
USB cable interrupts Execute
yes
Detected BL_CAN_Loop for
CANx
MSv38454V2
37 STM32F413xx/423xx devices
The system clock is derived from the embedded internal high-speed RC for USARTx and
I2Cx bootloaders. This internal clock is also used for CAN and DFU (USB FS device), but
only for the selection phase. An external clock multiple of 1 MHz (between 4 and 26 MHz) is
required for CAN and DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
System Reset
no
yes
I2C Address
Detected
no
HSE detected no no HSE detected
no Configure CAN
Execute DFU
bootloader using USB
USB cable interrupts Execute
yes
Detected BL_CAN_Loop for
CAN2
MSv42229V1
38 STM32F42xxx/43xxx devices
The system clock is derived from the embedded internal high-speed RC for USARTx and
I2Cx bootloaders. This internal clock is also used for CAN and DFU (USB FS device), but
only for the selection phase. An external clock multiple of 1 MHz (between 4 and 26 MHz) is
required for CAN and DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
Figure 48. Dual bank boot implementation for STM32F42xxx/43xxx Bootloader V7.x
System Reset
If Boot0 = 0
yes
no
If Value of first
address of Bank2 is
yes
within int. SRAM
address(1)
Protection level2 no
Set Bank Swap to
enabled
Bank2
no
Protection level2 no
yes
enabled
Set Bank Swap to Set Bank Swap to Set Bank Swap to
Bank1 Bank1 Bank2
no
MS35021V1
1. CCM RAM is not considered valid as stack pointer address for the dual bank boot mechanism.
Bootloader
Configure
Configure I2Cx USARTx
Execute
0x7F received BL_USART_Loop
on USARTx for USARTx
yes
no
Execute
BL_I2C_Loop for
I2Cx
I2C Address
Detected yes
HSE detected
no no
yes yes
Frame detected
no on CANx HSE detected no Disable all
interrupt sources
Generate System
no yes reset
Reconfigure System
clock to 60MHz
Reconfigure System
USB cable clock to 60MHz and
Detected USB clock to 48 MHz Configure CAN
MS35022V1
The system clock is derived from the embedded internal high-speed RC for USARTx, I2Cx
I2Cx, and SPIx bootloaders. This internal clock is also used for CAN and DFU (USB FS
device), but only for the selection phase. An external clock multiple of 1 MHz (between 4
and 26 MHz) is required for CAN and DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
Figure 50. Dual bank boot implementation for STM32F42xxx/43xxx bootloader V9.x
System Reset
If Boot0 = 0
yes
no
If Value of first
address of Bank2 is
yes
within int. SRAM
address(1) Protection level2
no
Set Bank Swap to enabled
Bank2
no
Protection level2 no
yes
enabled
Set Bank Swap to Set Bank Swap to Set Bank Swap to
Bank1 Bank1 Bank2
no
MS35023V1
1. CCM RAM is not considered valid as stack pointer address for the dual bank boot mechanism.
Bootloader
Execute
BL_USART_Loop for
0x7F received USARTx
on USARTx
no Execute
BL_I2C_Loop for
yes
I2Cx
I2C Address
Detected
Execute
no
yes BL_SPI_Loop for
SPIx
Synchro
mechanism detected
on SPIx yes
no HSE detected
no
HSE detected
Frame detected yes
no yes no
on CANx
Disable all interrupt
sources
yes
no Generate System
reset
Reconfigure System clock
Reconfigure System to 60MHz
USB cable clock to 60MHz and
Detected USB clock to 48 MHz
Configure CAN
MS35024V1
39 STM32F446xx devices
The system clock is derived from the embedded internal high-speed RC for USARTx and
I2Cx bootloaders. This internal clock is also used for CAN and DFU (USB FS device), but
only for the selection phase. An external clock multiple of 1 MHz (between 4 and 26 MHz) is
required for CAN and DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
System Reset
Execute
BL_USART_Loop
0x7F received for USARTx
on USARTx
no
Execute
I2C address yes Disable all
BL_I2C_Loop for
detected interrupt sources
I2Cx
no
Execute
Synchro mechanism Disable all
yes BL_I2C_Loop for
detected on SPIx interrupt sources
SPIx
yes
no
HSE detected
no
no
yes yes
Frame detected
on CANx HSE detected no Disable all
interrupt sources
Generate System
yes reset
no Reconfigure System
clock to 60MHz
Reconfigure System
clock to 60MHz and
USB cable USB clock to 48 MHz Configure CAN
Detected
MSv36763V2
40 STM32F469xx/479xx devices
The system clock is derived from the embedded internal high-speed RC for USARTx and
I2Cx bootloaders. This internal clock is also used for CAN and DFU (USB FS device), but
only for the selection phase. An external clock multiple of 1 MHz (between 4 and 48 MHz) is
required for CAN and DFUs execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
Figure 53. Dual bank boot implementation for STM32F469xx/479xx Bootloader V9.x
System Reset
If Boot = 0 no
yes
If value of
first address of Bank2
yes
is within int. SRAM
address
Set Bank Swap to
Bank2
no
Jump to user code Protection
no
in Bank2 level2 enabled
Continue Bootloader
If value of
execution
first address of Bank1
yes
is within int. SRAM yes
address
no If value of
first address of Bank2
yes
is within int. SRAM
Protection address
yes
level2 enabled
no
Continue Bootloader Jump to user code Jump to user code Jump to user code
execution in Bank1 in Bank1 in Bank2
MSv38429V1
Bootloader
0x7F received
yes
on USARTx
no
I2C Address
yes
Detected
no
no HSE detected
Frame detected
yes
on CANx Reconfigure
Reconfigure System System clock to
clock to 60MHz and 60MHz
USB clock to 48 MHz
no
Configure CAN
Execute DFU
USB cable bootloader using USB
yes
Detected interrupts
Execute
BL_CAN_Loop for
CAN2
no
MSv38430V2
41 STM32F72xxx/73xxx devices
The system clock is derived from the embedded internal high-speed RC for USARTx and
I2Cx bootloaders. This internal clock is also used for CAN and DFU (USB FS device), but
only for the selection phase. An external clock multiple of 1 MHz (between 4 and 26 MHz) is
required for CAN and DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
6\VWHP5HVHW
6\VWHP,QLW &ORFN*3,2V
,:'*6\V7LFN \HV
&RQILJXUH86%27*)6
GHYLFH \HV
'LVDEOHDOOLQWHUUXSW
\HV VRXUFHVDQGRWKHU
LQWHUIDFHVFORFNV
&RQILJXUH,&[
'LVDEOHDOOLQWHUUXSW 'LVDEOHDOOLQWHUUXSW
VRXUFHVDQGRWKHU VRXUFHVDQGRWKHU &RQILJXUH
LQWHUIDFHVFORFNV LQWHUIDFHVFORFNV 86$57[
&RQILJXUH63,[
QR
\HV
,&$GGUHVV
'HWHFWHG
QR
+6(GHWHFWHG QR QR +6(GHWHFWHG
6\QFKURPHFKDQLVP *HQHUDWH6\VWHP
GHWHFWHGRQ63,[ \HV UHVHW \HV
'LVDEOHDOOLQWHUUXSW
'LVDEOHRWKHU
VRXUFHVDQGRWKHU
QR LQWHUIDFHVFORFNV
LQWHUIDFHVFORFNV
QR
QR &RQILJXUH&$1
([HFXWH')8
ERRWORDGHUXVLQJ86%
86%FDEOH LQWHUUXSWV ([HFXWH
\HV
'HWHFWHG %/B&$1B/RRSIRU
&$1[
06Y9
42 STM32F74xxx/75xxx devices
The system clock is derived from the embedded internal high-speed RC for USARTx and
I2Cx bootloaders. This internal clock is also used for CAN and DFU (USB FS device), but
only for the selection phase. An external clock multiple of 1 MHz (between 4 and 26 MHz) is
required for CAN and DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
System Reset
yes
Execute Execute
BL_I2C_Loop BL_USART_Loop
0x7F received on for I2Cx for USARTx
USARTx
yes
no
I2C Address
Detected HSE detected no no HSE detected
no Generate System
yes reset yes
MSv37792V1
The system clock is derived from the embedded internal high-speed RC for USARTx, I2Cx
I2Cx, and SPIx bootloaders. This internal clock is also used for CAN and DFU (USB FS
device), but only for the selection phase. An external clock multiple of 1 MHz (between 4
and 26 MHz) is required for CAN and DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
System Reset
no
yes
I2C Address
Detected
no
HSE detected no no HSE detected
no Configure CAN
Execute DFU
bootloader using USB
USB cable interrupts Execute
yes
Detected BL_CAN_Loop for
CAN2
MSv36793V1
43 STM32F76xxx/77xxx devices
The system clock is derived from the embedded internal high-speed RC for USARTx and
I2Cx bootloaders. This internal clock is also used for CAN and DFU (USB FS device), but
only for the selection phase. An external clock multiple of 1 MHz (between 4 and 26 MHz) is
required for CAN and DFU execution after the selection phase.
Note: Due to HSI deviation and since HSI is used to detect HSE value, use low rather than high
frequency HSE crystal values (low frequency values are better detected due to larger error
margin). For example, it is better to use 8 MHz instead of 25 MHz.
Figure 58. Dual bank boot implementation for STM32F76xxx/77xxx Bootloader V9.x
System Reset
nDBANK = 0 &
yes
nDBOOT = 0
no
If boot address is in
yes
Bank2
no
Jump to address
defined by
BOOT_ADDx
If boot address is in
no yes
Bank1
Set Bank Swap to
Bank1
no
Jump to address
defined by
BOOT_ADDx
Protection level2
yes
enabled
no
Jump to AXIM-Flash
Continue Bootloader
base address 0x0800
execution
0000
MSv38482V2
1. Only BOOT_ADD0 value is considered whatever the BOOT0 pin state, as described in Table 95.
2. ITCM RAM is not considered valid as stack pointer address for the dual bank boot mechanism.
Bootloader
I2C Address
Detected HSE detected no no HSE detected
Generate System
no reset
yes yes
MSv38483V2
44 STM32G03xxx/STM32G04xxx devices
Note: On SO8, WLCSP18, TSSOP20, and UFQFN28 packages USART1 PA9/PA10 IOs are
remapped on PA11/PA12.
System reset
Configure autobaudrate
USARTx
Configure I2Cx
No
Execute
BL_USART_Loop
for USARTx
MS56834V1
Bootloader
Configure I2Cx
Configure autobaudrate
USARTx
yes
Configure SPIx
yes
0x7F received
on USARTx Disable all other
yes interfaces clocks
no
no
Execute Execute Execute
no BL_SPI_Loop BL_I2C_Loop BL_USART_Loop
for SPIx for I2Cx for USARTx
Synchro mechanism
detected on SPIx
MS51450V2
V11.0 Initial bootloader version Not supporting packages smaller than LQFP64
V11.1 Supporting all packages None
System reset
yes
Reconfigure System clock to
60 MHz using HSE System Init (Clock, GPIOs,
IWDG, SysTick)
Configure USB
Configure I2Cx
yes
Configure SPIx
Configure I2Cx
Configure SPIx
Execute
BL_FDCAN loop
Configure USARTx
Configure FDCANx
Disable all interrupt
sources and other
interfaces clocks
FDCAN frame Disable all interrupt Disable all interrupt
detected yes sources and other
sources and other
interfaces clocks interfaces clocks
no
Execute Execute Execute
0x7F received BL_SPI_Loop BL_I2C_Loop BL_USART_Loop
on USARTx yes for SPIx for I2Cx for USARTx
no
I2C address
yes
detected
no
no
Execute DFU
Synchro mechanism yes bootloader using USB
detected on SPIx
interrupts
no
MS56835V1
48 STM32G05xxx/061xx devices
System reset
Configure I2Cx
Configure autobaudrate
USARTx
0x7F received
yes
on USARTx
yes
no
Disable all interrupt
Disable all interrupt
sources and other
no I2Cx address sources and other
interfaces clocks
detected interfaces clocks
Execute
BL_USART_Loop
for USARTx
MS56836V1
Initial bootloader
V5.0 USART2 SW jitter issue on detection phase
version
Non-stretch command not working as expected and stretching the line
– Root cause: wrong BUSY check leads to not entering BUSY byte
generation while waiting for the Non stretch command to complete
Fix V5.0 – Behavior: when running a non-stretch commands instead of receiving a
V5.1 BUSY byte (0x76) while command is running; the BL is stretching the line
limitation
and no data is sent to the host.. This is noticed only on the non-stretch
erase command, as it can take few ms, and can cause an issue if the host
does not support the line stretching.
– Workaround: patch in RAM to use the correct check
49 STM32G431xx/441xx devices
System reset
Configure I2Cx
Configure SPIx
Disable all interrupt Disable all interrupt Disable all interrupt
sources and other sources and other sources and other
interfaces clocks interfaces clocks interfaces clocks
Configure USARTx
no
I2C address
yes
detected
no
Disable other
Synchro mechanism interfaces clocks
yes
detected on SPIx
no Execute DFU
bootloader using USB
interrupts
no
MS51432V2
50 STM32G47xxx/48xxx devices
System reset
Configure I2Cx
Configure SPIx
Disable all interrupt Disable all interrupt Disable all interrupt
sources and other sources and other sources and other
interfaces clocks interfaces clocks interfaces clocks
Configure USARTx
no
I2C address
yes
detected
no
Disable other
Synchro mechanism interfaces clocks
yes
detected on SPIx
no Execute DFU
bootloader using USB
interrupts
no
MS51432V2
Figure 67. Dual bank boot implementation for STM32G47xxx/48xxx bootloader V13.x
System Reset
If Boot from
FLASH
no
yes
V13.3 (0xD3) Initial bootloader version Boot from bank2 is not working
51 STM32G491xx/4A1xx devices
System reset
Configure I2Cx
Configure SPIx
Disable all interrupt Disable all interrupt Disable all interrupt
sources and other sources and other sources and other
interfaces clocks interfaces clocks interfaces clocks
Configure USARTx
no
I2C address
yes
detected
no
Disable other
Synchro mechanism interfaces clocks
yes
detected on SPIx
no Execute DFU
bootloader using USB
interrupts
no
MS51432V2
52 STM32H503xx devices
Note: USB special commands are slightly different from the other protocols as per the USB
protocol specificities:
• No Opcode is used, Sub-Opcode is used directly
• Sub-Opcode is treated in a single byte and not two bytes
• Data are sent on USB frame by byte (LSB first). No need to add number of data to transmit
• Returned data and status are formatted on the USB native protocol
De-Init system
Configure system No
clock to 200 MHz
with HSI and PLL
Disable all
Exexute
FDCAN frame interrupt sources
Yes BL_FDCAN_Loop
detected and other
for FDCANx
System Init (Clock, interface clocks
GPIOs, IWDG,
SysTick)
No
Disable all
Execute
Configure USB FS I2C address interrupt sources
Yes BL_I2C_Loop
device detected and other
for I2Cx
interface clocks
No
Configure
USARTx
Disable all
SPIx detects Execute
interrupt sources
synchro Yes BL_SPI_Loop
and other
mechanism for SPIx
No interface clocks
Configure I2Cx
No
Disable all
Configure SPIx I3Cx detects Execute
interrupt sources
broadcast and Yes BL_I3C_Loop
and other
synchro byte for I3Cx
interface clocks
Configure No
FDCANx
Execute DFU
USB cable
Yes bootloader using
detected
USB interrupts
Configure I3Cx
MS57511V4
53 STM32H523xx/533xx devices
Number of
Sub- Number of Number of Status
Data sent Data status data
Function Opcode data sent data data
(MSB first) received received
(2 bytes) (2 bytes) received received
(2 bytes)
Product state
Change
0x01 0x4 targeted 0x0 NA 0x1 0x0
product state
Ex: 0x00000017
Reset 0x02 0x4 0x0 0x0 NA 0x1 0x0
Data RAM address – NA if
– 0x0 if
provisioning where data to success
0x83 0x4 success 0x1 0x0
Only when BL provision is – Error code
– 0x1 if fail
is on HDPL = 1 written if fail
Note: USB special commands are slightly different from the other protocols as per the USB
protocol specificities:
• No Opcode is used, Sub-Opcode is used directly
• Sub-Opcode is treated in a single byte and not two bytes
• Data are sent on USB frame by byte (LSB first). No need to add number of data to transmit
• Returned data and status is formatted on the USB native protocol
De-Init system
Configure system No
clock to 200 MHz
with HSI and PLL
Disable all
Exexute
FDCAN frame interrupt sources
Yes BL_FDCAN_Loop
detected and other
for FDCANx
System Init (Clock, interface clocks
GPIOs, IWDG,
SysTick)
No
Disable all
Execute
Configure USB FS I2C address interrupt sources
Yes BL_I2C_Loop
device detected and other
for I2Cx
interface clocks
No
Configure
USARTx
Disable all
SPIx detects Execute
interrupt sources
synchro Yes BL_SPI_Loop
and other
mechanism for SPIx
No interface clocks
Configure I2Cx
No
Disable all
Configure SPIx I3Cx detects Execute
interrupt sources
broadcast and Yes BL_I3C_Loop
and other
synchro byte for I3Cx
interface clocks
Configure No
FDCANx
Execute DFU
USB cable
Yes bootloader using
detected
USB interrupts
Configure I3Cx
(only if I3C is
enabled by OB)
MS56544V2
54 STM32H562xx/563xx/573xx devices
Common to all RAM 16 Kbytes, starting from address 0x20000000, are used by
-
the bootloader firmware
35 Kbytes, starting from address 0x0BF97000, contain the
System memory -
bootloader firmware
The IWDG prescaler is configured to its maximum value. It is
IWDG - periodically refreshed to prevent watchdog reset (if the
hardware IWDG option was previously enabled by the user).
Once initialized, the configuration is 8-bit, even parity, and
USART1 Enabled
one stop bit
PA10 pin: USART1 in reception mode. Used in alternate
USART1 USART1_RX pin Input
push-pull, pull-up mode.
PA9 pin: USART1 in transmission mode. Set as input until
USART1_TX pin Output
USART1 is detected.
Once initialized, the configuration is 8-bit, even parity, and
USART2 Enabled
one stop bit
PA3 pin: USART2 in reception mode. Used in alternate push-
USART2 USART2_RX pin Input
pull, pull-up mode.
PA2 pin: USART2 in transmission mode. Set as input until
USART2_TX pin Output
USART2 is detected.
Once initialized, the configuration is 8-bit, even parity, and
USART3 Enabled
one stop bit
PD9 pin: USART3 in reception mode. Used in alternate push-
USART3 USART3_RX pin Input
pull, pull-down mode.
PD8 pin: USART3 in transmission mode. Set as input until
USART3_TX pin Output
USART3 is detected.
Number of
Sub- Number of Number of Status
Data sent Data status data
Function Opcode data sent data data
(MSB first) received received
(2 bytes) (2 bytes) received received
(2 bytes)
Product state
Change product
0x01 0x4 targeted 0x0 NA 0x1 0x0
state
Ex: 0x00000017
Reset 0x02 0x4 0x0 0x0 NA 0x1 0x0
Data RAM address – NA if
– 0x0 if
provisioning where data to success
0x83 0x4 success 0x1 0x0
Only when BL is provision is – Error code
– 0x1 if fail
on HDPL = 1 written if fail
Note: USB special commands are slightly different from the other protocols as per the USB
protocol specificities:
• No Opcode is used, Sub-Opcode is used directly
• Sub-Opcode is treated in a single byte and not two bytes
• Data are sent on USB frame by byte (LSB first). No need to add number of data to transmit
• Returned data and status is formatted on the USB native protocol
De-Init system
Configure system No
clock to 200 MHz
with HSI and PLL
Disable all
Exexute
FDCAN frame interrupt sources
Yes BL_FDCAN_Loop
detected and other
for FDCANx
System Init (Clock, interface clocks
GPIOs, IWDG,
SysTick)
No
Disable all
Execute
Configure USB FS I2C address interrupt sources
Yes BL_I2C_Loop
device detected and other
for I2Cx
interface clocks
No
Configure
USARTx
Disable all
SPIx detects Execute
interrupt sources
synchro Yes BL_SPI_Loop
and other
mechanism for SPIx
No interface clocks
Configure I2Cx
No
Disable all
Configure SPIx I3Cx detects Execute
interrupt sources
broadcast and Yes BL_I3C_Loop
and other
synchro byte for I3Cx
interface clocks
Configure No
FDCANx
Execute DFU
USB cable
Yes bootloader using
detected
USB interrupts
Configure I3Cx
MS57511V4
55 STM32H72xxx/73xxx devices
System Reset
Configure
USB OTG FS Device
Configure I2Cx
no
I2Cx address
yes
detected
no
SPIx detects
no Synchro yes
mechanism
no
MS54027V2
56 STM32H74xxx/75xxx devices
Note: To connect to the bootloader USART1 using PB14/PB15 pins, user must send two
synchronization bytes. Baudrate is limited to 115200.
DFU mode does not support USBREGEN mode. If STM32 is powered by an 1.8 V source, it
is not possible to use the BL DFU unless 3.3 V is provided
System Reset
Configure
USB OTG FS Device
Configure I2Cx
no
I2Cx address
yes
detected
no
SPIx detects
no Synchro yes
mechanism
no
MSv45966V4
SRAM1/SRAM2/SRAM3 (0x30000000 to
0x30047FFF) and ITCM memories not accessible by
the BL
57 STM32H7A3xx/7B3xx/7B0xx devices
HSI enabled The system clock frequency is 64 MHz using the HSI.
CRS is enabled for the DFU to allow USB to be clocked
-
RCC by HSI48 48 MHz
Clock used for the FDCAN is fixed to 20 MHz and is
-
derived from PLLQ
16 Kbytes, starting from address 0x24000000, are
RAM -
used by the bootloader firmware
128 Kbytes, starting from address 0x1FF00000 contain
Common to all
System memory - the bootloader firmware. The bootloader start address
is 0x1FF0A000
The IWDG prescaler is configured to its maximum
value. It is periodically refreshed to prevent watchdog
IWDG -
reset (if the hardware IWDG option was previously
enabled by the user).
Bootloader software writes to PWR_CR3 register using
Power - four bytes, which locks it, only Power off/on unlocks it.
Fixed on the bootloader with 0x92 versions.
Once initialized, the configuration is 8-bit, even parity,
USART1 Enabled
and one stop bit
PA10 pin: USART1 in reception mode. Used in
USART1_RX pin Input
USART1 alternate push-pull, pull-up mode.
PA9 pin: USART1 in transmission mode. Used in
USART1_TX pin Output alternate push-pull, pull-up mode. Set as input until
USART1 is detected on the bootloader version 0x92.
Once initialized, the configuration is 8-bit, even parity,
USART2 Enabled
and one stop bit
PA3 pin: USART2 in reception mode. Used in alternate
USART2_RX pin Input
USART2 push-pull, pull-up mode.
PA2 pin: USART2 in transmission mode. Used in
USART2_TX pin Output alternate push-pull, pull-up mode. Set as input until
USART2 is detected on the bootloader version 0x92.
Configure
USB OTG FS device
Configure I2Cx
Configure SPIx
no
I2Cx address
yes
detected
no
SPIx detects
no
Synchro yes
mechanism
no
MSv45966V5
58 STM32H7Rxxx/7Sxxx devices
De-Init system
Configure system No
clock to 380 MHz
with HSI and PLL
Disable all
Exexute
FDCAN frame interrupt sources
Yes BL_FDCAN_Loop
detected and other
for FDCANx
System Init (Clock, interface clocks
GPIOs, IWDG,
SysTick)
No
Disable all
Execute
Configure USB FS I2C address interrupt sources
Yes BL_I2C_Loop
device detected and other
for I2Cx
interface clocks
No
Configure
USARTx
Disable all
SPIx detects Execute
interrupt sources
synchro Yes BL_SPI_Loop
and other
mechanism for SPIx
No interface clocks
Configure I2Cx
No
Disable all
Configure SPIx I3Cx detects Execute
interrupt sources
broadcast and Yes BL_I3C_Loop
and other
synchro byte for I3Cx
interface clocks
Configure No
FDCANx
Execute DFU
USB cable
Yes bootloader using
detected
USB interrupts
Configure I3Cx
(only if I3C is
enabled by OB)
MS56537V2
59 STM32L01xxx/02xxx devices
The system clock is derived from the embedded internal high-speed RC for all bootloader
interfaces. No external quartz is required for bootloader operations.
Note: Due to empty check mechanism present on this product, it is not possible to jump from user
code to system bootloader. Such jump results in a jump back to user flash memory space.
But if the first 4 bytes of user flash memory (at 0x0800 0000) are empty at the moment of
the jump (i.e. erase first sector before jump or execute code from SRAM while flash is
empty), then system bootloader is executed when jumped to.
System Reset
Disable all
interrupt sources
Configure SPIx
0x7F received
yes
on USARTx
MSv38476V1
60 STM32L031xx/041xx devices
The system clock is derived from the embedded internal high-speed RC for all bootloader
interfaces. No external quartz is required for bootloader operations.
The bootloader Read/Write commands do not support SRAM space for this product.
System Reset
Disable all
interrupt sources
Configure SPIx
0x7F received on
yes
USARTx
Disable all other
interfaces clocks
no
yes Configure
Disable all other USARTx
interfaces clocks
SPIx detects
no Execute
Synchro
BL_USART_Loop
mechanism Execute for USARTx
BL_SPI_Loop for
SPIx
MS35035V1
61 STM32L05xxx/06xxx devices
The system clock is derived from the embedded internal high-speed RC for all bootloader
interfaces. No external quartz is required for bootloader operations.
System Reset
Disable all
interrupt sources
Configure SPIx
0x7F received on
yes
USARTx
Disable all other
interfaces clocks
no
yes Configure
Disable all other USARTx
interfaces clocks
SPIx detects
no Execute
Synchro
BL_USART_Loop
mechanism Execute for USARTx
BL_SPI_Loop for
SPIx
MS35035V1
62 STM32L07xxx/08xxx devices
The system clock is derived from the embedded internal high-speed RC for all bootloader
interfaces. No external quartz is required for bootloader operations.
Figure 79. Dual bank boot implementation for STM32L07xxx/08xxx bootloader V4.x
System Reset
If Boot0 = 0 no
yes
If Value of first
address of Bank2 is Protection
within int. SRAM
yes no
level2 enabled
address
Set Bank Swap to
Bank2
Continue Bootloader
no Jump to user yes
execution
code in Bank2
no
no
Protection
level2 enabled
yes
Continue Bootloader
Jump to user Jump to user Jump to user
execution
code in Bank1 code in Bank1 code in Bank2
MSv38477V1
Bootloader
0x7F received on
yes
USARTx
Disable all
interrupt sources
no
Configure
USARTx
USB cable
yes
Detected
no Execute
Execute DFU bootloader BL_USART_Loop
using USB interrupts for USARTx
MSv38442V1
The system clock is derived from the embedded internal high-speed RC for all bootloader
interfaces. No external quartz is required for bootloader operations.
Figure 81. Dual bank boot implementation for STM32L07xxx/08xxx bootloader V11.x
System Reset
If Boot0 = 0 no
yes
If Value of first
address of Bank2 is Protection
within int. SRAM
yes no
level2 enabled
address
Set Bank Swap to
Bank2
Continue Bootloader
no Jump to user yes
execution
code in Bank2
no
no
Protection
level2 enabled
yes
Continue Bootloader
Jump to user Jump to user Jump to user
execution
code in Bank1 code in Bank1 code in Bank2
MSv38477V1
Bootloader
Disable all
interrupt sources
Configure I2Cx
Configure SPIx
0x7F received
yes
on USARTx
no
I2Cx Address
yes
detected
no
yes Disable all other
no interfaces clocks
MSv38443V2
63 STM32L1xxx6(8/B)A devices
The system clock is derived from the embedded internal high-speed RC, no external . No
external quartz is required for the bootloader execution.
System Reset
0x7F received on
USARTx
no yes
Disable all
interrupt sources
Configure
USARTx
Execute
BL_USART_Loop
for USARTx
MS35033V1
64 STM32L1xxx6(8/B) devices
The system clock is derived from the embedded internal high-speed RC, no external . No
external quartz is required for the bootloader execution.
System Reset
0x7F received on
USARTx
no yes
Disable all
interrupt sources
Configure
USARTx
Execute
BL_USART_Loop
for USARTx
MS35007V1
65 STM32L1xxxC devices
The system clock is derived from the embedded internal high-speed RC for the USARTx
bootloader. This internal clock is also used the for DFU, but only for the selection phase. An
external clock in the range of [24, 16, 12, 8, 6, 4, 3, 2] MHz is required for the execution of
the DFU after the selection phase.
System Reset
Configure USB
USB cable
yes
Detected
no
Generate System
yes yes reset
Reconfigure System
Disable all clock to 32MHz and
interrupt sources USB clock to 48 MHz
Configure
Execute DFU
USARTx
bootloader using USB
interrupts
Execute
BL_USART_Loop
for USARTx
MS35008V1
66 STM32L1xxxD devices
The system clock is derived from the embedded internal high-speed RC for USARTx
bootloader. This internal clock is used also for DFU, but only for the selection phase. An
external clock in the range of [24, 16, 12, 8, 6, 4, 3, 2] MHz is required for DFU execution
after the selection phase.
System Reset
Protection
no yes
level2 enabled
If Value
@0x08030000 is
yes yes
within int. SRAM
address Jump to user code
in Bank2 If Value
no no @0x08030000 is
yes
within int. SRAM
If Value address
@0x08000000 is Jump to user code
yes in Bank2
within int. SRAM
address Jump to user code no
in Bank1
no If Value
@0x08000000 is
Continue Bootloader execution yes
within int. SRAM
address
Jump to user code
Disable all in Bank1
interrupt sources no
CPU blocked
System Init (Clock, GPIOs, (halted)
IWDG, SysTick)
Configure USB
yes
yes
no yes
67 STM32L1xxxE devices
The system clock is derived from the embedded internal high-speed RC for USARTx
bootloader. This internal clock is used also for DFU, but only for the selection phase. An
external clock in the range of [24, 16, 12, 8, 6, 4, 3, 2] MHz is required for DFU execution
after the selection phase.
System Reset
no
yes yes
If Value
no If Value @0x08040000 is @0x08040000 is within yes
yes
within int. SRAM address int. SRAM address
Configure USB
Reconfigure System
clock to 32MHz and
USB cable USB clock to 48 MHz
detected
yes
no yes
Execute DFU
bootloader using USB
0x7F received interrupts
Configure USARTx
on USARTx
Execute BL_USART_Loop
no for USARTx
MS35034V3
68 STM32L412xx/422xx devices
Note: If VDDUSB pin is not connected to VDD, SPI flash memory write operations may be
corrupted due to voltage issue. For more details, refer to product’s datasheet and errata
sheet.
Figure 88. Dual bank boot Implementation for STM32L412xx/422xx bootloader V9.x
System Reset
If Boot0 = 0
yes
no
If Value of first
address of Bank2 is
yes
within int. SRAM
address(1)
Protection level2 no
Set Bank Swap to
enabled
Bank2
no
Protection level2 no
yes
enabled
Set Bank Swap to Set Bank Swap to Set Bank Swap to
Bank1 Bank1 Bank2
no
MS35021V1
System Reset
no
I2C Address
yes
Detected
no
Disable other
Synchro mechanism interfaces clocks
yes
detected on SPIx
Execute DFU
bootloader using USB
no
interrupts
no
MS51432V1
69 STM32L43xxx/44xxx devices
Note: If VDDUSB pin is not connected to VDD, SPI flash memory write operations may be
corrupted due to voltage issue. For more details, refer to product’s datasheet and errata
sheet.
SPI Tx (MISO) is handled by DMA. On the bootloader start-up after SPI initialization, as
soon as the bit DMATx enable on SPI CR2 register is set to 0x1, the MISO line is set to
3.3 V.
Figure 90. Dual bank boot Implementation for STM32L3x2xx/44xxx bootloader V9.x
System Reset
If Boot0 = 0
yes
no
If Value of first
address of Bank2 is
yes
within int. SRAM
address(1)
Protection level2 no
Set Bank Swap to
enabled
Bank2
no
Protection level2 no
yes
enabled
Set Bank Swap to Set Bank Swap to Set Bank Swap to
Bank1 Bank1 Bank2
no
MS35021V1
System Reset
Configure SPIx
0x7F received on
USARTx yes
HSE detected no
no
Generate System
I2C Address yes reset
yes
Detected
Disable all interrupt
sources and other
no
interfaces clocks
no
Disable other Configure CAN
no interfaces clocks
Frame detected
on CANx yes
Execute DFU Execute
bootloader using USB BL_CAN_Loop for
no interrupts CANx
USB cable
yes
Detected
MSv38484V1
70 STM32L45xxx/46xxx devices
Note: If VDDUSB pin is not connected to VDD, SPI flash memory write operations may be
corrupted due to voltage issue. For more details, refer to product’s datasheet and errata
sheet.
Figure 92. Dual bank boot implementation for STM32L45xxx/46xxx bootloader V9.x
System Reset
If Boot0 = 0
yes
no
If Value of first
address of Bank2 is
yes
within int. SRAM
address(1)
Protection level2 no
Set Bank Swap to
enabled
Bank2
no
Protection level2 no
yes
enabled
Set Bank Swap to Set Bank Swap to Set Bank Swap to
Bank1 Bank1 Bank2
no
MS35021V1
System Reset
no
I2C Address
yes
Detected HSE detected no
Generate System
no reset
yes
Reconfigure System
no clock to 60 MHz
no
MSv45964V1
71 STM32L47xxx/48xxx devices
Figure 94. Dual bank boot implementation for STM32L47xxx/48xxx bootloader V10.x
System Reset
If Boot0 = 0
no
yes
Bootloader
LSE detected no
yes
Configure USB clock to 48
MHz with HSI as clock source
Configure USB clock to 48
MHz with MSI as clock source
0x7F received
on USARTx
Disable all
yes
interrupt sources
no
Execute
BL_I2C_Loop for
I2C Address I2Cx
Detected yes
MSI used as USB
no
clock source
no
yes HSE detected no
SPI1 PA7 pin: slave data input line, used in push-pull, pull-down
SPI1_MOSI pin Input
mode
PA6 pin: slave data output line, used in push-pull, pull-
SPI1_MISO pin Output
down mode(1)
PA5 pin: slave clock line, used in push-pull, pull-down
SPI1_SCK pin
mode
Input
PA4 pin: slave chip select pin used in push-pull, pull-down
SPI1_NSS pin
mode.
The SPI2 configuration is:
– Slave mode
– Full Duplex
SPI2 Enabled
– 8-bit MSB
– Speed up to 8 MHz
– Polarity: CPOL low, CPHA low, NSS hardware
SPI2 PB15 pin: slave data input line, used in push-pull, pull-
SPI2_MOSI pin Input
down mode
PB14 pin: slave data output line, used in push-pull, pull-
SPI2_MISO pin Output
down mode(1)
PB13 pin: slave clock line, used in push-pull, pull-down
SPI2_SCK pin
mode
Input
PB12 pin: slave chip select pin used in push-pull, pull-down
SPI2_NSS pin
mode.
Once initialized the CAN1 configuration is: Baudrate 125
CAN1 Enabled
kbps, 11-bit identifier.
PB8 pin: CAN1 in reception mode. Used in alternate push-
CAN1 CAN1_RX pin Input
pull, pull-up mode.
PB9 pin: CAN1 in transmission mode. Used in alternate
CAN1_TX pin Output
push-pull, pull-up mode.
USB FS configured in forced device mode. USB FS
interrupt vector is enabled and used for USB DFU
USB Enabled communications.
Note: VDDUSB IO must be connected to 3.3 V as USB
DFU peripheral is used by the bootloader.
PA11 pin: USB FS DM line. Used in alternate push-pull, no
USB_DM pin
pull mode.
Input/output
PA12 pin: USB FS DP line. Used in alternate push-pull, no
USB_DP pin
pull mode. No external pull-up resistor is required.
1. SPI Tx (MISO) is handled by DMA. On the bootloader start-up after SPI initialization, as soon as the bit DMATx enable on
SPI CR2 register is set to 0x1, the MISO line is set to 3.3 V.
If the HSE is present, the system clock and USB clock are configured, respectively, to 72
and 48 MHz with PLL (clocked by HSE) as a clock source.
Note: If VDDUSB pin is not connected to VDD, SPI flash memory write operations may be
corrupted due to voltage issue. For more details, refer to product’s datasheet and errata
sheet.
Figure 96. Dual bank boot implementation for STM32L47xxx/48xxx bootloader V9.x
System Reset
If Boot0 = 0
no
yes
Bootloader
LSE detected no
yes
System Init(Clock,
GPIOs,IWDG,Systick)
Configure USB OTG FS device Disable all interrupt Disable all interrupt sources
Disable all interrupt sources
sources and other and other interfaces clocks
and other interfaces clocks
interfaces clocks
0x7F received on
yes
USARTx
MSI used as USB clock
no source
yes
I2C Address
yes no
Detected
no
HSE detected no no HSE detected
Synchro mechanism yes
detected on SPIx yes
yes
no yes Generate System yes
Reconfigure System reset
no USB cable clock to 60 MHz
Detected Reconfigure System clock
to 72 MHz and USB clock
no Configure CAN to 48 MHz
Frame yes
detected on Execute
CANx BL_CAN_Loop Execute DFU bootloader
for CANx using USB interrupts
MSv38404V1
72 STM32L496xx/4A6xx devices
Note: If VDDUSB pin is not connected to VDD, SPI flash memory write operations may be
corrupted due to voltage issue. For more details, refer to product’s datasheet and errata
sheet.
Figure 98. Dual bank boot Implementation for STM32L496xx/4A6xx bootloader V9.x
System Reset
If Boot0 = 0
yes
no
If Value of first
address of Bank2 is
yes
within int. SRAM
address(1)
Protection level2 no
Set Bank Swap to
enabled
Bank2
no
Protection level2 no
yes
enabled
Set Bank Swap to Set Bank Swap to Set Bank Swap to
Bank1 Bank1 Bank2
no
MS35021V1
System Reset
no
I2C Address
yes HSE detected no
Detected
Generate System
no reset
yes
Reconfigure System
no clock to 60 MHz
no
MSv44808V1
73 STM32L4P5xx/4Q5xx devices
Figure 100. Dual bank boot implementation for STM32L4P5xx/4Q5xx bootloader V9.x
System Reset
If Boot0 = 0
no
yes
System Reset
Configure I2Cx
Configure SPIx
no
HSE detected no
Synchro mechanism
yes
detected on SPIx
Generate
yes System reset
Frame detected on
Reconfigure System
CANx
clock to 60 MHz
Disable other
no interfaces clocks Configure CAN
MS49689V1
74 STM32L4Rxxx/4Sxxx devices
Figure 102. Dual bank boot implementation for STM32L4Rxxx/STM32L4Sxxx bootloader V9.x
System Reset
If Boot0 = 0
no
yes
System Reset
Configure I2Cx
Configure SPIx
no
HSE detected no
Synchro mechanism
yes
detected on SPIx
Generate
yes System reset
Frame detected on
Reconfigure System
CANx
clock to 60 MHz
Disable other
no interfaces clocks Configure CAN
MS49689V1
75 STM32L552xx/62xx devices
SPI1 SPI1_MOSI pin Input PA7 pin: slave data input line, used in push-pull, pull-down mode
PA6 pin: slave data output line, used in push-pull, pull-down
SPI1_MISO pin Output
mode
SPI1_SCK pin Input PA5 pin: slave clock line, used in push-pull, pull-down mode
PA4 pin: slave chip select pin used in push-pull, pull-down mode.
SPI1_NSS pin Input Note: This IO can be tied to GND if the SPI master does not use
it.
Number of
Sub- Number of Number of
Data Data status data Status data
Function Opcode data sent data
sent received received received
(2 bytes) (2 bytes) received
(2 bytes)
TrustZone disable
Must be run when 0x82 0x4 0x0 0x0 NA 0x1 0x0
TZEN = 1 and RDP = 1
Regression from RDP
L1 to RDP 0.5
0x82 0x4 0x1 0x0 NA 0x1 0x0
Must be run when
TZEN = 1 and RDP = 1
Note: USB special commands are slightly different from the other protocols as per the USB
protocol specificities:
• No Opcode is used, Sub-Opcode is used directly
• Sub-Opcode is treated in a single byte and not two bytes
• Data is sent on USB frame byte per byte. No need to add number of data to be
transmitted
• Returned data and status is formatted on the USB native protocol
System Reset
Configure I2Cx
no
I2C Address
yes
Detected
no
no
Execute DFU
Synchro mechanism yes bootloader using USB
detected on SPIx
interrupts
no
MS52834V1
76 STM32WB10xx/15xx devices
Bootloader
Disable all
interrupt sources
Configure I2Cx
Configure SPIx
0x7F received
yes
on USARTx
no
I2Cx Address
yes
detected
no
yes Disable all other
no interfaces clocks
MSv38443V2
77 STM32WB30xx/35xx/50xx/55xx devices
System Reset
Configure I2Cx
Configure SPIx
no
Synchro mechanism
yes
detected on SPIx
no
Disable other
interfaces clocks
no
Execute DFU
USB cable bootloader using
yes
Detected USB interrupts
MS51473V1
Note: Instability when performing multiple resets during operations ongoing causing Overrun or
FrameError errors on USART Bootloader and not recoverable unless Hardware Reset is
performed. Fixed by workaround in FUS V1.0.1 and V1.0.2.
78 STM32WBA52xx devices
Number of
Sub- Number of Number of Status
Data status data
Function Opcode data sent Data sent data data
received received
(2 bytes) (2 bytes) received received
(2 bytes)
TrustZone disable
Must be run when 0x82 0x4 0x0 0x0 NA 0x1 0x0
TZEN = 1 and RDP = 1
Regression from RDP
L1 to RDP 0.5
0x82 0x4 0x1 0x0 NA 0x1 0x0
Must be run when
TZEN = 1 and RDP = 1
Unlock write protection
Must be run when 0x82 0x4 0xYY02(1) 0x0 NA 0x1 0x0
RDP = 1
1. 0xYY can have 3 values (0: WRP area, 1: WRP1A, 2: WRP2A)
System Reset
Configure I2Cx
Configure SPIx
0x7F received
yes
on USARTx
no
I2Cx Address
yes
Detected
Configure USARTx
SPIx detects Synchro yes
mechanism
MSv38431V2
79 STM32WBA54xx/55xx devices
Number of
Sub- Number of Number of Status
Data status data
Function Opcode data sent Data sent data data
received received
(2 bytes) (2 bytes) received received
(2 bytes)
TrustZone disable
Must be run when 0x82 0x4 0x0 0x0 NA 0x1 0x0
TZEN = 1 and RDP = 1
Number of
Sub- Number of Number of Status
Data status data
Function Opcode data sent Data sent data data
received received
(2 bytes) (2 bytes) received received
(2 bytes)
System reset
Configure I2Cx
Configure SPIx
Configure USARTx
0x7F received
yes
on USARTx
no
I2Cx address
yes
detected
MSv38431V4
80 STM32WBA62xx/63xx/64xx/65xx devices
1. SPI Tx (MISO) is handled by DMA. On the bootloader start-up after SPI initialization, as soon as the bit DMATx enable on
SPI CR2 register is set to 0x1, the MISO line is set to 3.3 V.
Number of
Sub- Number of Number of Status
Data status data
Function Opcode data sent Data sent data data
received received
(2 bytes) (2 bytes) received received
(2 bytes)
TrustZone disable
Must be run when 0x82 0x4 0x0 0x0 NA 0x1 0x0
TZEN = 1 and RDP = 1
Regression from RDP
L1 to RDP 0.5
0x82 0x4 0x1 0x0 NA 0x1 0x0
Must be run when
TZEN = 1 and RDP = 1
Unlock write protection
Must be run when 0x82 0x4 0xYY02(1) 0x0 NA 0x1 0x0
RDP = 1
1. 0xYY can have three values (0: WRP area, 1: WRP1A, 2: WRP2A)
Note: USB special commands are slightly different from the other protocols as per the USB
protocol specificities:
• No Opcode is used, Sub-Opcode is used directly
• Sub-Opcode is treated in a single byte and not in two bytes
• Data is sent on USB frame byte per byte. No need to add the number of data to be
transmitted
• Returned data and status is formatted on the USB native protocol
System Reset
Or JumpToBL
Disable all
0x7F Exexute
interrupt sources
detected on Yes BL_USART_Loop
Denitialize system and other
USART Tx for USARTx
interfaces clocks
Configure System
clock to 60 MHz
from HSI ĺ3// No
Disable all
Execute
System Init I2C address interrupt sources
Yes BL_I2C_Loop for
(&ORFN*3,2V detected and other
I2Cx
IWDG, SysTick) interfaces clocks
No
Configure USB
HS device Disable all
63,[GHWHFWV Execute
interrupt sources
Synchro Yes BLB63,B/RRSIRU
and other
mechanism 63,[
interfaces clocks
Configure
USARTx No No
Yes
MS56840V1
81 STM32WB05xx devices
RCC HSI enabled The system clock frequency is 16 MHz using HSI
RAM - The last 3 Kbytes of the last bank
Common to all
6 Kbytes, starting from address 0x10000000,
System memory -
contain the bootloader firmware
USART Enabled Once initialized, the configuration is 8-bit, no parity
PB0 pin: USART in reception mode. Used in
USART_RX pin Input
USART alternate push-pull, pull-up mode.
PA1 pin: USART in transmission mode. Not set until
USART_TX pin Output
USART is detected.
System reset or
JumpToBL
Configure USART
0x7F detected No
on USART?
Yes
MS56627V1
Execute BL_USART_Loop
for USART
MS56627V1
82 STM32WB06xx/07xx devices
RCC HSI enabled The system clock frequency is 16 MHz using HSI
RAM - The last 3 Kbytes of the last bank
Common to all
6 Kbytes, starting from address 0x10000000,
System memory -
contain the bootloader firmware
USART Enabled Once initialized, the configuration is 8-bit, no parity
PA8 pin: USART in reception mode. Used in
USART_RX pin Input
USART alternate push-pull, pull-up mode.
PA9 pin: USART in transmission mode. Not set until
USART_TX pin Output
USART is detected.
System reset or
JumpToBL
Configure USART
0x7F detected No
on USART?
Yes
MS56627V1
Execute BL_USART_Loop
for USART
MS56627V1
83 STM32WB09xx devices
RCC HSI enabled The system clock frequency is 16 MHz using HSI
RAM - The last 3 Kbytes of the last bank
Common to all
6 Kbytes, starting from address 0x10000000,
System memory -
contain the bootloader firmware
USART Enabled Once initialized, the configuration is 8-bit, no parity
PB0 pin: USART in reception mode. Used in
USART_RX pin Input
USART alternate push-pull, pull-up mode.
PA1 pin: USART in transmission mode. Not set until
USART_TX pin Output
USART is detected.
System reset or
JumpToBL
Configure USART
0x7F detected No
on USART?
Yes
MS56627V1
Execute BL_USART_Loop
for USART
MS56627V1
84 STM32WLE5xx/55xx devices
System Reset
Configure SPIx
Configure USARTx
0x7F received
yes
on USARTx
yes
no
MSv38476V2
85 STM32U031xx devices
Bootloader
Configure I2Cx
Configure USARTx
yes
Configure SPIx
yes
0x7F received
on USARTx Disable all other
yes interfaces clocks
no
no
Execute Execute Execute
no BL_SPI_Loop BL_I2C_Loop BL_USART_Loop
for SPIx for I2Cx for USARTx
Synchro mechanism
detected on SPIx
MS56837V1
86 STM32U073xx/83xx devices
System Reset
or JumpToBL
Disable all
Exexute
De-Init system 0x7F detected interrupt sources
Yes BL_USART_Loop
Configure system clock on USARTx and other
for USARTx
to 24 MHz with HSI and interface clocks
PLL and HSI48 for USB
No
Configure USB FS No
device
Disable all
SPIx detects Execute
interrupt sources
No synchro Yes BL_SPI_Loop
and other
mechanism for SPIx
Configure USARTx interface clocks
No
Configure I2Cx
Execute DFU
USB cable
Yes bootloader using
detected
USB interrupts
Configure SPIx
MS56538V2
87 STM32U375xx/85xx devices
Number of
Sub- Number of Number of status
Data Status data
Function Opcode data sent Data sent data data
received received
(2 bytes) (2 bytes) received received
(2 bytes)
TrustZone
disable
Must be run when 0x82 0x4 0x0 0x0 NA 0x1 0x0
TZEN = 1 and
RDP = 1
Regression from
RDP L1 to RDP
0.5
0x82 0x4 0x1 0x0 NA 0x1 0x0
Must be run when
TZEN = 1 and
RDP = 1
Unlock write
protection
0x82 0x4 0xYY02(1) 0x0 NA 0x1 0x0
Must be run when
RDP = 1
1. 0xYY can have four values (0: WRP area, 1: WRP1A, 2: WRP2A, 3: WRP1B, 4: WRP2B)
Note: USB special commands are slightly different from the other protocols as per the USB
protocol specificities:
• No Opcode is used, Sub-Opcode is used directly
• Sub-Opcode is treated in a single byte and not two bytes
• Data is sent on USB frame byte per byte. No need to add number of data to be
transmitted
• Returned data and status is formatted on the USB native protocol
System Reset
Or JumpToBL
Disable all
0x7F Exexute
interrupt sources
DenitIalize detected on Yes BL_USART_Loo
and other
system USART Tx p for USARTx
interfaces clocks
Configure
System clock to No
48 MHz with
MSIS (MSI/2)
Disable all
FDCAN Exexute
interrupt sources
frame Yes BL_FDCAN_Loo
and other
System Init detected p for FDCANx
interfaces clocks
(Clock, GPIOs,
IWDG, SysTick)
No
Configure No
USARTx
Disable all
SPIx detects Execute
interrupt sources
Synchro Yes BL_SPI_Loop
and other
mechanism for SPIx
interfaces clocks
Configure I2Cx
No
Configure
No
FDCANx
Execute DFU
USB cable
Yes bootloader using
detected
USB interrupts
Configure I3Cx
MS56839V1
88 STM32U535xx/545xx devices
Number of
Sub- Number of Number of status
Data Status data
Function Opcode data sent Data sent data data
received received
(2 bytes) (2 bytes) received received
(2 bytes)
TrustZone
disable
Must be run when 0x82 0x4 0x0 0x0 NA 0x1 0x0
TZEN = 1 and
RDP = 1
Regression from
RDP L1 to RDP
0.5
0x82 0x4 0x1 0x0 NA 0x1 0x0
Must be run when
TZEN = 1 and
RDP = 1
Unlock write
protection
0x82 0x4 0xYY02(1) 0x0 NA 0x1 0x0
Must be run when
RDP = 1
1. 0xYY can have four values (0: WRP area, 1: WRP1A, 2: WRP2A, 3: WRP1B, 4: WRP2B)
Note: USB special commands are slightly different from the other protocols as per the USB
protocol specificities:
• No Opcode is used, Sub-Opcode is used directly
• Sub-Opcode is treated in a single byte and not two bytes
• Data is sent on USB frame byte per byte. No need to add number of data to be
transmitted
• Returned data and status is formatted on the USB native protocol
System reset
Or JumpToBL
Disable all
Exexute
0x7F detected interrupt sources
De-Init system Yes BL_USART_Loop
on USARTx and other
Configure system for USARTx
interfaces clocks
clock to 60 MHz
with HSI and PLL
No
Disable all
System Init (Clock, Execute
FDCAN frame interrupt sources
GPIOs, IWDG, Yes BL_FDCAN_Loop
detected and other
SysTick) for FDCANx
interfaces clocks
No
Configure
USARTx Disable all
Execute
I2C address interrupt sources
Yes BL_I2C_Loop
detected and other
for I2Cx
interfaces clocks
Configure USB FS
device
No No
Disable all
SPIx detects Execute
Configure I2Cx interrupt sources
Synchro Yes BL_SPI_Loop
and other
mechanism for SPIx
interfaces clocks
No
Configure SPIx
Disable all
Execute DFU
USB cable interrupt sources
Yes bootloader using
detected and other
USB interrupts
interfaces clocks
MS57522V2
Configure
FDCANx
89 STM32U575xx/85xx devices
Number of
Sub- Number of Number of status
Data Status data
Function Opcode data sent Data sent data data
received received
(2 bytes) (2 bytes) received received
(2 bytes)
TrustZone
disable
Must be run when 0x82 0x4 0x0 0x0 NA 0x1 0x0
TZEN = 1 and
RDP = 1
Regression from
RDP L1 to RDP
0.5
0x82 0x4 0x1 0x0 NA 0x1 0x0
Must be run when
TZEN = 1 and
RDP = 1
Unlock write
protection
0x82 0x4 0xYY02(1) 0x0 NA 0x1 0x0
Must be run when
RDP = 1
1. 0xYY can have four values (0: WRP area, 1: WRP1A, 2: WRP2A, 3: WRP1B, 4: WRP2B)
Note: USB special commands are slightly different from the other protocols as per the USB
protocol specificities:
• No Opcode is used, Sub-Opcode is used directly
• Sub-Opcode is treated in a single byte and not two bytes
• Data is sent on USB frame byte per byte. No need to add number of data to be
transmitted
• Returned data and status is formatted on the USB native protocol
System reset
Or JumpToBL
Disable all
Exexute
0x7F detected interrupt sources
De-Init system Yes BL_USART_Loop
on USARTx and other
Configure system for USARTx
interfaces clocks
clock to 60 MHz
with HSI and PLL
No
Disable all
System Init (Clock, Execute
FDCAN frame interrupt sources
GPIOs, IWDG, Yes BL_FDCAN_Loop
detected and other
SysTick) for FDCANx
interfaces clocks
No
Configure
USARTx Disable all
Execute
I2C address interrupt sources
Yes BL_I2C_Loop
detected and other
for I2Cx
interfaces clocks
Configure USB FS
device
No No
Disable all
SPIx detects Execute
Configure I2Cx interrupt sources
Synchro Yes BL_SPI_Loop
and other
mechanism for SPIx
interfaces clocks
No
Configure SPIx
Disable all
Execute DFU
USB cable interrupt sources
Yes bootloader using
detected and other
USB interrupts
interfaces clocks
MS57522V2
Configure
FDCANx
90 STM32U595xx/99xx/A5xx/A9xx devices
Number of
Sub- Number of Number of
Data status data Status data
Function Opcode data sent Data sent data
received received received
(2 bytes) (2 bytes) received
(2 bytes)
TrustZone disable
Must be run when
0x82 0x4 0x0 0x0 NA 0x1 0x0
TZEN = 1 and
RDP = 1
Regression from
RDP L1 to RDP 0.5
Must be run when 0x82 0x4 0x1 0x0 NA 0x1 0x0
TZEN = 1 and
RDP = 1
Unlock write
protection
0x82 0x4 0xYY02(1) 0x0 NA 0x1 0x0
Must be run when
RDP = 1
1. 0xYY can have four values (0: WRP area, 1: WRP1A, 2: WRP2A, 3: WRP1B, 4: WRP2B)
Note: USB special commands are slightly different from the other protocols as per the USB
protocol specificities:
• No Opcode is used, Sub-Opcode is used directly
• Sub-Opcode is treated in a single byte and not two bytes
• Data is sent on USB frame byte per byte. No need to add number of data to be
transmitted
• Returned data and status is formatted on the USB native protocol
System Reset
Or JumpToBL
Disable all
Execute
0x7F detected on interrupt sources
De-Init system Yes BL_USART_Loop
USARTx and other
Configure System for USARTx
interface clocks
clock to 60 MHz
with HSI and PLL
No
No
Configure
USB HS device Disable all
Execute
I2C address interrupt sources
Yes BL_I2C_Loop
detected and other
for I2Cx
interface clocks
No No
Configure
USARTx
Disable all
SPIx detects Execute
interrupt sources
Synchro Yes BL_SPI_Loop
and other
mechanism for SPIx
interface clocks
Configure I2Cx No
Stop, DeInit
USB cable USB IP, and
Yes System Reset
detected start quartz
detection
Configure SPIx
Re-configure
Execute DFU No
Configure System and Quartz
MS57512V2
91 STM32U5F7xx/F9xx/G7xx/G9xx devices
DFU USB_DM pin PA11: USB DM line. Used in input no pull mode.
Input/output PA12: USB DP line. Used in input no pull mode.
USB_DP pin
No external pull-up resistor is required
Number of
Sub- Number of Number Status
Data status data
Function Opcode data sent Data sent of data data
received received
(2 bytes) (2 bytes) received received
(2 bytes)
TrustZone disable
Must be run when TZEN = 1 0x82 0x4 0x0 0x0 NA 0x1 0x0
and RDP = 1
Regression from RDP L1 to
RDP 0.5
0x82 0x4 0x1 0x0 NA 0x1 0x0
Must be run when TZEN = 1
and RDP = 1
Unlock write protection
0x82 0x4 0xYY02(1) 0x0 NA 0x1 0x0
Must be run when RDP = 1
1. 0xYY can have four values (0: WRP area, 1: WRP1A, 2: WRP2A, 3: WRP1B, 4: WRP2B)
Note: USB special commands are slightly different from the other protocols as per the USB
protocol specificities:
• No Opcode is used, Sub-Opcode is used directly
• Sub-Opcode is treated in a single byte and not two bytes
• Data is sent on USB frame byte per byte. No need to add number of data to be
transmitted
• Returned data and status is formatted on the USB native protocol
System Reset
Or JumpToBL
Disable all
Execute
0x7F detected on interrupt sources
De-Init system Yes BL_USART_Loop
USARTx and other
Configure System for USARTx
interface clocks
clock to 60 MHz
with HSI and PLL
No
No
Configure
USB HS device Disable all
Execute
I2C address interrupt sources
Yes BL_I2C_Loop
detected and other
for I2Cx
interface clocks
No No
Configure
USARTx
Disable all
SPIx detects Execute
interrupt sources
Synchro Yes BL_SPI_Loop
and other
mechanism for SPIx
interface clocks
Configure I2Cx No
Stop, DeInit
USB cable USB IP, and
Yes System Reset
detected start quartz
detection
Configure SPIx
Re-configure
Execute DFU No
Configure System and Quartz
MS57512V2
The bootloader protocol command set and sequences for each serial peripheral are the
same for all STM32 devices. Some parameters depend on device and bootloader version:
• PID (Product ID)
• Valid RAM addresses (RAM area used during bootloader execution is not accessible)
accepted by the bootloader when the Read Memory, Go and Write Memory commands
are requested.
• System memory area.
Table 209 shows the values of these parameters for each STM32 device.
0x20000000 -
STM32C011xx 0x443 0x51
0x20002FFF 0x1FFF0000 -
0x20002000 - 0x1FFF17FF
STM32C031xx 0x453 0x52
0x200017FF
0x20001400 - 0x1FFF0000 -
C0 STM32C051xx 0x44C 0xB0
0x20002FFF 0x1FFF2FFF
0x20002300 - 0x1FFF0000 -
STM32C071xx 0x493 0xD1
0x20005FFF 0x1FFF6FFF
0x20002400 - 0x1FFF0000 -
STM32C091xx/92xx 0x44D 0x121
0x200077FF 0x1FFF3FFF
0x20000800 -
STM32F05xxx and STM32F030x8 0x440 0x21
0x20001FFF 0x1FFFEC00 -
0x20000800 - 0x1FFFF7FF
STM32F03xx4/6 0x444 0x10
0x20000FFF
0x20001800 - 0x1FFFD800 -
STM32F030xC 0x442 0x52
0x20007FFF 0x1FFFF7FF
0x1FFFC400 -
STM32F04xxx 0x445 0xA1 NA
0x1FFFF7FF
F0
0x1FFFC400 -
STM32F070x6 0x445 0xA2 NA
0x1FFFF7FF
0x1FFFC800 -
STM32F070xB 0x448 0xA2 NA
0x1FFFF7FF
0x20001800 - 0x1FFFC800 -
STM32F071xx/072xx 0x448 0xA1
0x20003FFF 0x1FFFF7FF
0x1FFFD800 -
STM32F09xxx 0x442 0x50 NA
0x1FFFF7FF
0x20000200 -
Low-density 0x412 NA
0x200027FF
0x20000200 -
Medium-density 0x410 NA
0x20004FFF
0x20000200 - 0x1FFFF000 -
STM32F10xxx High-density 0x414 NA
0x2000FFFF 0x1FFFF7FF
0x20000200 -
F1 Medium-density value line 0x420 0x10
0x20001FFF
0x20000200 -
High-density value line 0x428 0x10
0x20007FFF
0x20001000 - 0x1FFFB000 -
STM32F105xx/107xx 0x418 NA
0x2000FFFF 0x1FFFF7FF
0x20000800 - 0x1FFFE000 -
STM32F10xxx XL-density 0x430 0x21
0x20017FFF 0x1FFFF7FF
0x20 0x20002000 - 0x1FFF0000 -
F2 STM32F2xxxx 0x411
0x33 0x2001FFFF 0x1FFF77FF
0x20001400 -
STM32F373xx 0x41
0x20007FFF
0x432
0x20001000 -
STM32F378xx 0x50
0x20007FFF
STM32F302xB(C)/303xB(C) 0x41 0x20001400 -
0x422
STM32F358xx 0x50 0x20009FFF
0x20002000 -
0x31
0x2001FFFF
STM32F40xxx/41xxx 0x413
0x20003000 -
0x91
0x2001FFFF
0x70 0x20003000 -
STM32F42xxx/43xxx 0x419
0x91 0x2002FFFF
0x20003000 -
STM32F401xB(C) 0x423 0xD1
0x2000FFFF
0x20003000 -
STM32F401xD(E) 0x433 0xD1
0x20017FFF
0x20003000 - 0x1FFF0000 -
F4 STM32F410xx 0x458 0xB1
0x20007FFF 0x1FFF77FF
0x20003000 -
STM32F411xx 0x431 0xD0
0x2001FFFF
0x20003000 -
STM32F412xx 0x441 0x90
0x2003FFFF
0x20003000 -
STM32F446xx 0x421 0x90
0x2001FFFF
0x20003000 -
STM32F469xx/479xx 0x434 0x90
0x2005FFFF
0x20003000 -
STM32F413xx/423xx 0x463 0x90
0x2004FFFF
0x20004000 - 0x1FF00000 -
STM32F72xxx/73xxx 0x452 0x90
0x2003FFFF 0x1FF0EDBF
0x20004000 - 0x1FF00000 -
0x70
0x2004FFFF 0x1FF0EDBF
F7 STM32F74xxx/75xxx 0x449
0x20004000 - 0x1FF00000 -
0x90
0x2004FFFF 0x1FF0EDBF
0x20004000 - 0x1FF00000 -
STM32F76xxx/77xxx 0x451 0x93
0x2007FFFF 0x1FF0EDBF
0x20001000 - 0x1FFF0000 -
STM32G03xxx/04xxx 0x466 0x52
0x20001FFF 0x1FFF1FFF
0x20001000 - 0x1FFF0000 -
STM32G05xxx/061xx 0x456 0x51
0x20002000 0x1FFF1FFF
0x20002700 - 0x1FFF0000 -
STM32G07xxx/08xxx 0x460 0xB3
0x20009000 0x1FFF6FFF
G0 0x1FFF0000 -
0x20004000 - 0x1FFF6FFF
STM32G0B0xx 0x467 0xD0
0x20020000 0x1FFF8000 -
0x1FFFEFFF
0x1FFF0000 -
0x20004000 - 0x1FFF6FFF
STM32G0B1xx/0C1xx 0x467 0x92
0x20020000 0x1FFF8000 -
0x1FFFEFFF
0x20004000 – 0x1FFF0000 -
STM32G431xx/441xx 0x468 0xD4
0x20005800 0x1FFF7000
0x20004000 – 0x1FFF0000 -
G4 STM32G47xxx/48xxx 0x469 0xD5
0x20018000 0x1FFF7000
0x20004000 - 0x1FFF0000 -
STM32G491xx/A1xx 0x479 0xD2
0x2001C000 0x1FFF7000
0x20004000 - 0x0BF87000 -
STM32H503xx 0x474 0xE1
0x20007FFF 0x0BF8FFFF
0x20000000 - 0x0BF97000 -
H5 STM32H562xx/563xx/573xx 0x484 0xE3
0x2009FFFF 0x0BF9FFFF
0x20004000 - 0x0BF97000 -
STM32H523xx/533xx 0x478 0xE2
0x20043FFF 0x0BF9FFFF
0x20004100 -
0x2001FFFF 0x1FF00000 -
STM32H72xxx/73xxx 0x483 0x93
0x24004000 - 0x1FF1E7FF
0x2404FFFF
0x20004100 -
0x2001FFFF 0x1FF00000 -
STM32H74xxx/75xxx 0x450 0x91
0x24005000 - 0x1FF1E7FF
0x2407FFFF
0x20004100 -
H7 0x2001FFFF 0x1FF00000 -
STM32H7A3xx/7B3xx/7B0xx 0x480 0x92
0x24034000 - 0x1FF13FFF
0x2407FFFF
0x24000000 -
0x2401FFFF
0x24024000 -
0x24071FFF 0x1FF18000 -
STM32H7Rxxx/7Sxxx 0x485 0xE3
0x20000000 - 0x1FF1FFFF
0x2002FFFF
0x00000000 -
0x0002FFFF(1)
0x1FF00000 -
STM32L01xxx/02xxx 0x457 0xC3 NA
0x1FF00FFF
0x20001000 - 0x1FF00000 -
STM32L031xx/041xx 0x425 0xC0
0x20001FFF 0x1FF00FFF
0x20001000 - 0x1FF00000 -
L0 STM32L05xxx/06xxx 0x417 0xC0
0x20001FFF 0x1FF00FFF
0x20001000 -
0x41
0x20004FFF 0x1FF00000 -
STM32L07xxx/08xxx 0x447
0x20001400 - 0x1FF01FFF
0xB2
0x20004FFF
0x20000800 -
STM32L1xxx6(8/B) 0x416 0x20
0x20003FFF
STM32L1xxx6(8/B)A 0x429 0x20 0x20001000 -
STM32L1xxxC 0x427 0x40 0x20007FFF 0x1FF00000 -
L1
0x1FF01FFF
0x20001000 -
STM32L1xxxD 0x436 0x45
0x2000BFFF
0x20001000 -
STM32L1xxxE 0x437 0x40
0x20013FFF
93 Bootloader timings
This section details the timings of the bootloader firmware to use for correct synchronization
between the host and the STM32 device.
Two types of timings are described, namely STM32 device bootloader resources
initialization duration, and communication interface selection duration.
After these timings the bootloader is ready to receive and execute host commands.
STM32C011xx 2.1 NA
STM32C031xx 2.1 NA
STM32C051xx 2.262 NA
STM32C071xx 2.358 NA
STM32C091xx/92xx 1.527 NA
STM32F03xx4/6 1.612 NA
STM32F05xxx and STM32F030x8 devices 1.612 NA
STM32F04xxx 0.058 NA
STM32F071xx/072xx 0.058 NA
HSE connected 3
STM32F070x6 200
HSE not connected 230
HSE connected 6
STM32F070xB 200
HSE not connected 230
STM32F09xxx 2 NA
STM32F030xC 2 NA
STM32F10xxx 1.227 NA
PA9 pin low 1.396
STM32F105xx/107xx NA
PA9 pin high 524.376
STM32F10xxx XL-density 1.227 NA
V2.x 134 NA
STM32F2xxxx
V3.x 84.59 0.790
HSE connected 45
STM32F301xx/302x4(6/8) 560.5
HSE not connected 560.8
HSE connected 43.4
STM32F302xB(C)/303xB(C) 2.236
HSE not connected 2.36
HSE connected 7.53 NA
STM32F302xD(E)/303xD
HSE not connected 146.71 NA
STM32F303x4(6/8)/334xx/328xx 0.155 NA
STM32F318xx 0.182 NA
STM32F358xx 1.542 NA
HSE connected 43.4
STM32F373xx 2.236
HSE not connected 2.36
STM32F378xx 1.542 NA
STM32F398xx 1.72 NA
V3.x 84.59 0.790
STM32F40xxx/41xxx
V9.x 74 96
STM32F401xB(C) 74.5 85
STM32F401xD(E) 74.5 85
STM32F410xx 0.614 NA
STM32F411xx 74.5 85
STM32F412xx 0.614 180
STM32F413xx/423xx 0.642 165
V7.x 82 97
STM32F429xx/439xx
V9.x 74 97
STM32F446xx 73.61 96
STM32F469xx/479xx 73.68 230
STM32F72xxx/73xxx 17.93 50
STM32F74xxx/75xxx 16.63 50
STM32G03xxx/04xxx 0.390 NA
STM32G07xxx/08xxx 0.390 NA
STM32G0Bxxx/Cxxx 0.390 NA
STM32G05xxx/061xx 0.390 NA
STM32G4xxxx 0.390 NA
STM32H503xx 0,238 NA
STM32H562xx/63xx/73xx 0.292 NA
STM32H72xxx/73xxx 53.975 NA
STM32H74xxx/75xxx 53.975 2
STM32H7A3xx/7B3xx/7B0xx 545 NA
STM32L01xxx/02xxx 0.63 NA
STM32L031xx/041xx 0.62 NA
STM32L05xxx/06xxx 0.22 NA
V4.x 0.61 NA
STM32L07xxx/08xxx
V11.x 0.71 NA
STM32L1xxx6(8/B)A 0.542 NA
STM32L1xxx6(8/B) 0.542 NA
STM32L1xxxC 0.708 80
STM32L1xxxD 0.708 80
STM32L1xxxE 0.708 200
STM32L43xxx/44xxx 0.86 100
STM32L45xxx/46xxx 0.86 NA
LSE connected 55
V10.x 100
LSE not connected 2560
STM32L47xxx/48xxx
LSE connected 55.40
V9.x 100
LSE not connected 2560.5
STM32L412xx/422xx 0.86 NA
STM32L496xx/4A6xx 76.93 100
STM32L4P5xx /Q5xx 9.891 NA
STM32L4Rxx/4Sxx 10.12 NA
STM32L552xx/562xx 0.390 NA
STM32U031xx 4.534 NA
STM32U073xx/ STM32U083xx 5.626 NA
STM32U375xx/385xx 4.418 NA
STM32U535xx/545xx 0.390 NA
STM32U575xx/85xx 0.390 NA
STM32U595xx/599xx/5A5xx/5A9xx 0.390 NA
STM32U5F7xx/5F9xx/5G7xx/5G9xx 0.390 NA
STM32WB10xx/15xx/30xx/35xx/50xx/55xx 0.390 NA
STM32WBA52xx 0.390 NA
STM32WBA62xx/63xx/64xx/65xx 2,73 NA
STM32WLE5xx/WL55xx 0.390 NA
a b a
Bootloader
execution time
1. Receiving characters different from 0x7F (or line glitches) causes bootloader to start communication using
a wrong baudrate. Bootloader measures the signal length between rising edge of the first bit to the falling
edge of the last bit to deduce the baudrate value
2. Bootloader does not realign the calculated baudrate to standard baudrate values (i.e. 1200, 9600, 115200).
Note: The PA9 pin (USB_VBUS) on STM32F105xx/107xx devices is used to detect the USB host
connection. The initialization of USB peripheral is performed only if PA9 is high at detection
phase, which means that a host is connected to the port and delivering 5 V on the USB bus.
When PA9 level is high at detection phase, more time is required to initialize and shutdown
the USB peripheral. To minimize bootloader detection time when PA9 pin is not used, keep
PA9 low during USART detection phase, from the moment the device is reset, until a device
ACK is sent.
Device
reset
a
Bootloader
execution time
Bootloader
ready to start
detection phase
MSv35042V1
Note: For STM32F105xx/107xx devices, if the external HSE crystal frequency is different from
25 MHz (14.7456 or 8 MHz), the device performs several unsuccessful enumerations (with
connect/disconnect sequences) before establishing a correct connection with the host. This
is due to the HSE detection mechanism based on Start Of Frame (SOF) detection.
STM32C011xx NA
STM32C031xx NA
STM32C051xx NA
STM32C071xx 552
STM32C091xx/92xx NA
STM32F04xxx 350
STM32F070x6 TBD
STM32F070xB 320
HSE = 25 MHz 460
STM32F105xx/107xx HSE = 14.7465 MHz 4500
HSE = 8 MHz 13700
STM32F2xxxx 270
STM32F301xx/302x4(6/8) 300
STM32F302xB(C)/303xB(C) 300
STM32F302xD(E)/303xD 100
STM32F373xx 300
V3.x 270
STM32F40xxx/41xxx
V9.x 250
STM32F401xB(C) 250
STM32F401xD(E) 250
STM32F411xx 250
STM32F412xx 380
STM32F413xx/423xx 350
V7.x
STM32F429xx/439xx 250
V9.x
STM32F446xx 200
STM32F469xx/479xx 270
STM32F72xxx/73xxx 320
STM32F74xxx/75xxx 230
STM32G0B1xx/C1xx 300
STM32G4xxxx 300
STM32H503xx 251
STM32H562xx/63xx/73xx 245
STM32H72xxx/73xxx 53.9764
STM32H74xxx/75xxx 53.9764
STM327A3xx/7B3xx/7B0xx 53.9764
STM32L07xxx/08xxx 140
STM32L1xxxC 849
STM32L1xxxD 849
STM32L412xx/422xx 820
STM32L43xxx/44xxx 820
STM32L45xxx/46xxx 330
V10.x
STM32L47xxx/48xxx 300
V9.x
STM32L496xx/4A6xx 430
STM32L4P5xx/4Q5xx 322
STM32L4Rxx/4Sxx 322
STM32L552xx/L562xx 300
STM32U031xx NA
STM32U073xx/ STM32U083xx 241
STM32U375xx/385xx 210
STM32U535xx/545xx 300
STM32U575xx/85xx 300
STM32U595xx/599xx/5A5xx/5A9xx 300
STM32U5F7xx/5F9xx/5G7xx/5G9xx 300
STM32WB30xx/35xx/50xx/55xx 300
STM32WBA62xx/63xx/64xx/65xx 69
a b
Bootloader
execution time
Device Bootloader
acknowledges its ready to receive
address and and execute
stretch line commands
a
Duration of start + 1 byte sending through I2C (depends on communication speed)
b Duration of I2C line stretching
MS35043V1
Note: For I2C communication, a timeout mechanism is implemented and must be respected to
execute bootloader commands correctly. This timeout is implemented between two I2C
frames in the same command (example: for Write memory command, a timeout is inserted
between command sending frame and address memory sending frame). The same timeout
period is inserted between two successive data receptions or transmissions in the same I2C
frame. If the timeout period elapses, a system reset is generated to avoid bootloader crash.
In Erase memory and Read-out unprotect commands, consider the duration of the operation
when implementing the host side. After sending the code of pages to erase, the host must
wait until the bootloader device performs page erasing to complete the remaining steps of
erase command.
a b a
Bootloader
execution time
Table 214. SPI bootloader minimum timings (ms) for STM32 devices
Device One SPI byte sending Delay between two bytes SPI connection
/**
**************************************************************************
****
* @file main.c
**************************************************************************
****
*/
/* Includes ---------------------------------------------------------------
---*/
#include "main.h"
/**
* @brief Main program
* @param None
* @retval None
*/
int main(void)
{
ConfigClock();
if (exit_with_magic_number)
{
JUMP_WITH_PARAM(exit_secure_memory_address, magic_number,
application_address);
}
else
{
JUMP_WITHOUT_PARAM(exit_secure_memory_address);
}
}
/**
* @brief ConfigClock
* @param None
* @retval None
*/
static void ConfigClock(void)
{
/* Will be developped as per the template of the needed project */
}
/**
* @brief JUMP_WITHOUT_PARAM
* @param jump_address
* @retval None
*/
void JUMP_WITHOUT_PARAM(uint32_t jump_address)
{
asm ("LDR R1, [R0]"); // jump_address
asm ("LDR R2, [R0,#4]");
asm ("MOV SP, R1");
asm ("BX R2");
}
/**
* @brief JUMP_WITH_PARAM
* @param jump_address, magic, applicationVectorAddress
* @retval None
*/
void JUMP_WITH_PARAM(uint32_t jump_address, uint32_t magic, uint32_t
applicationVectorAddress))
{
asm ("MOV R3, R0"); // jump_address
asm ("LDR R0, [R3]");
asm ("MOV SP, R0");
asm ("LDR R0, [R3,#4]");
asm ("BX R0");
}
/**
**************************************************************************
****
* @file main.c
**************************************************************************
****
*/
/* Includes ---------------------------------------------------------------
---*/
#include "main.h"
/**
* @brief Main program.
* @retval None.
*/
int main(void)
{
ConfigClock();
if (with_magic_number)
{
Jump_With_Param(exit_sticky_address, magic_number, application_address,
mpu_region_number);
}
else
{
Jump_Without_Param(exit_sticky_address, 0x0, 0x0, mpu_region_number);
}
}
/**
* @brief Configure system clocks.
* @retval None.
*/
static void ConfigClock(void)
{
/* Will be developped as per the template of the needed project */
}
/**
* @brief Jump to secure exit memory without magic number and user
address.
* @param exit_secure_address Address of exit secure memory.
* @param dummy1 Not used.
* @param dummy2 Not used.
* @param mpu_region_number MPU region to enable.
* @retval None.
*/
static void Jump_Without_Param(uint32_t exit_secure_address, uint32_t
dummy1, uint32_t dummy2, uint8_t mpu_region_number)
{
/**
* R0 = exit_secure_address --> Exit secure memory stack pointer
* R1 = dummy1 --> Dummy data
* R2 = dummy2 --> Dummy data
* R3 = mpu_region_number --> MPU region number
*
* NOTE: Assume R1 and R2 registers are useless so can be moified, but R3
is used for MPU region number and must not be changed
*/
asm ("LDR R1, [R0]"); // Load stack pointer (content of address
pointed by R0) in R1
asm ("LDR R2, [R0,#4]"); // Load jump address (content of address pointed
by R4 + 4) in R2
asm ("MOV SP, R1"); // Change stack pointer register with value from
R1
asm ("BX R2"); // Jump to address pointed by R2
}
/**
94 Revision history
Updated:
– Table 1: Applicable products, Table 2: Bootloader activation patterns, Table 3:
Embedded bootloaders, Table 106: STM32G431xx/441xx configuration in system
memory boot mode, Table 108: STM32G47xxx/48xxx configuration in system
memory boot mode, Table 109: STM32G47xxx/48xxx bootloader version, Table 124:
STM32H74xxx/75xxx bootloader version, Table 126: STM32H7A3xx/7B3xx/7B0xx
bootloader version, Table 163: STM32L4P5xx/4Q5xx bootloader versions, Table 166:
STM32L552xx/62xx configuration in system memory boot mode, Table 168:
STM32L552xx/62xx bootloader versions, Table 171: STM32WB30xx/35xx/50xx/55xx
configuration in system memory boot mode, Table 209: Bootloader device-dependent
parameters
– Section 3: Glossary, Section 42: STM32F74xxx/75xxx devices, Section 44.1:
Bootloader configuration, Section 45.1: Bootloader configuration, Section 49.1:
Bootloader configuration, Section 50.1: Bootloader configuration, Section 56.1:
Bootloader configuration
Added:
– Section 4.5: Bootloader UART baudrate detection, Section 4.6: Programming
04-Jun-2020 43
constraints, Section 4.7: ExitSecureMemory feature
– Note: in: Section 31.1.1: Bootloader configuration, Section 31.2.1: Bootloader
configuration, Section 32.1: Bootloader configuration, Section 33.1: Bootloader
configuration, Section 35.1: Bootloader configuration, Section 36.1: Bootloader
configuration, Section 37.1: Bootloader configuration, Section 38.1.1: Bootloader
configuration, Section 38.2.1: Bootloader configurationSection 39.1: Bootloader
configuration, Section 40.1: Bootloader configuration, Section 41.1: Bootloader
configuration, Section 42.1.1: Bootloader configuration, Section 42.2.1: Bootloader
configuration, Section 43.1: Bootloader configuration
– Figure 90: Dual bank boot Implementation for STM32L3x2xx/44xxx bootloader V9.x,
Figure 92: Dual bank boot implementation for STM32L45xxx/46xxx bootloader V9.x,
Figure 98: Dual bank boot Implementation for STM32L496xx/4A6xx bootloader V9.x
– Appendix A: Example of ExitSecureMemory v1.0 function
Deleted Figure 48. Access to securable memory area from the bootloader for
STM32G03xxx/G04xxx, Figure 50. Access to securable memory area from the
bootloader for STM32G07xxx/G08xxx, Figure 52. Access to securable memory area,
Figure 54. Access to securable memory area
Introduced STM32H72xxx/73xxx devices, hence added Section 55:
STM32H72xxx/73xxx devices and its subsections.
Updated Section 3: Glossary, note in Section 44.1: Bootloader configuration and
Section 77.1: Bootloader configuration.
Updated Table 1: Applicable products, Table 2: Bootloader activation patterns, Table 3:
Embedded bootloaders, Table 8: ExitSecureMemory entry address, Table 108:
STM32G47xxx/48xxx configuration in system memory boot mode, Table 126:
STM32H7A3xx/7B3xx/7B0xx bootloader version, Table 144: STM32L1xxxC
29-Jul-2020 44 configuration in system memory boot mode, Table 146: STM32L1xxxD configuration in
system memory boot mode, Table 148: STM32L1xxxE configuration in system memory
boot mode, Table 166: STM32L552xx/62xx configuration in system memory boot
mode, Table 209: Bootloader device-dependent parameters, Table 210: Bootloader
startup timings (ms), Table 211: USART bootloader minimum timings (ms), Table 212:
USB bootloader minimum timings (ms) and Table 213: I2C bootloader minimum timings
(ms).
Updated Figure 73: Bootloader V9.x selection for STM32H74xxx/75xxx.
Minor text edits across the whole document.
Updated:
– Table 1: Applicable products, Table 3: Embedded bootloaders, Table 8:
ExitSecureMemory entry address, Table 95: STM32F76xxx/77xxx bootloader V9.x
versions, Table 108: STM32G47xxx/48xxx configuration in system memory boot
mode, Table 150: STM32L412xx/422xx configuration in system memory boot mode,
Table 152: STM32L43xxx/44xxx configuration in system memory boot mode,
Table 154: STM32L45xxx/46xxx configuration in system memory boot mode,
Table 158: STM32L47xxx/48xxx configuration in system memory boot mode,
Table 160: STM32L496xx/4A6xx configuration in system memory boot mode,
Table 162: STM32L4P5xx/4Q5xx configuration in system memory boot mode,
16-Feb-2021 47
Table 164: STM32L4Rxxx/4Sxxx configuration in system memory boot mode,
Table 166: STM32L552xx/62xx configuration in system memory boot mode,
Table 171: STM32WB30xx/35xx/50xx/55xx configuration in system memory boot
mode, Table 209: Bootloader device-dependent parameters, Table 210: Bootloader
startup timings (ms), Table 211: USART bootloader minimum timings (ms),
Table 212: USB bootloader minimum timings (ms), Table 213: I2C bootloader
minimum timings (ms)
– Section 3: Glossary
Added Section 46: STM32G0B0xx device bootloader and Section 47:
STM32G0B1xx/0C1xx device bootloader
Updated:
– Table 1: Applicable products, Table 3: Embedded bootloaders, Table 8:
ExitSecureMemory entry address, Table 209: Bootloader device-dependent
01-Apr-2021 48 parameters, Table 210: Bootloader startup timings (ms), Table 211: USART
bootloader minimum timings (ms), Table 213: I2C bootloader minimum timings (ms)
Added Section 48: STM32G05xxx/061xx devices and Section 51:
STM32G491xx/4A1xx devices
Updated:
– Section 3: Glossary, Section 31.2.1: Bootloader configuration
– Table 3, Table 20,from Table 22 to Table 27, from Table 30 to Table 35, Table 36,
Table 38, Table 40, Table 44, Table 46, Table 48, Table 50, Table 52, Table 54,
Table 56, Table 58, Table 60, Table 62, Table 64, Table 66, Table 67, Table 68,
Table 70, Table 72, Table 74, Table 76, Table 78, Table 80, Table 82, Table 84,
Table 86, Table 88, Table 90, Table 92, Table 94, Table 96, Table 98, Table 100,
06-Jul-2021 49 Table 102, Table 104, Table 106, Table 108, Table 109, Table 110, Table 121,
Table 123, Table 125, Table 125, Table 130, Table 132, Table 134, Table 135,
Table 136, Table 138, Table 140, Table 142, Table 143, Table 144, Table 145,
Table 146, Table 148, Table 149, Table 150, Table 152, Table 154, Table 156,
Table 158, Table 160, Table 162, Table 164, Table 166, Table 171, Table 188,
Table 209
Added Table 167: STM32L552xx/62xx special commands and Section 76:
STM32WB10xx/15xx devices
Updated:
– Section 3: Glossary, Section 46.1: Bootloader configuration, Section 47.1:
Bootloader configuration,
23-Sep-2021 50
– Table 1, Table 2, Table 3, Table 99, Table 122, Table 124, Table 126, Table 153,
Table 170, Table 172, Table 209, Table 210, Table 211, Table 212, Table 213
Added Section 89: STM32U575xx/85xx devices
Updated:
20-Oct-2021 51 – Table 3, Table 67,Table 99, Table 122,Table 209
– Section 31.2.1: Bootloader configuration
Updated:
– Section 3: Glossary, Section 4.1: Bootloader activation,
04-Feb-2022 52 – Table 1, Table 2, Table 3, Table 7, Table 99, Table 124, Table 209
– Figure 62
Added Section 5: STM32C011xx devices and Section 6: STM32C031xx devices
Updated:
– Table 3, Table 121, Table 122, Table 209.
01-Mar-2022 53 – Section 4.1: Bootloader activation, , Section 44.1: Bootloader configuration,
Section 45.1: Bootloader configuration, Section 46.1: Bootloader configuration,
Section 48.1: Bootloader configuration
Updated:
20-Apr-2022 54
– Table 3, Table 121, Table 125, Table 126, Table 209
Updated:
22-Jun-2022 55
– Table 3, Table 123, Table 122, Table 209
Added Section 4.8: IWDG usage, Section 78: STM32WBA52xx devices
Updated:
– Table 1, Table 2, Table 3, Table 7, Table 124, Table 125, Table 189, Table 209,
14-Dec-2022 56 Table 210, Table 211, Table 213
– Section 3: Glossary, Section 4.1: Bootloader activation
– added note 1 in Table 98, Table 100, Table 102, Table 106, Table 108, Table 110,
Table 150
Updated:
– Table 1: Applicable products, Table 2: Bootloader activation patterns, Table 3:
Embedded bootloaders, Table 7: Flash memory alignment constraints, Table 209:
Bootloader device-dependent parameters, Table 210: Bootloader startup timings
21-Feb-2023 57 (ms), Table 211: USART bootloader minimum timings (ms), Table 212: USB
bootloader minimum timings (ms), Table 213: I2C bootloader minimum timings (ms)
– Section 3: Glossary, Section 4.2: Bootloader identification
Added Section 52: STM32H503xx devices, Section 54: STM32H562xx/563xx/573xx
devices, Section 90: STM32U595xx/99xx/A5xx/A9xx devices
Updated:
– Table 1: Applicable products, Table 3: Embedded bootloaders, Table 209: Bootloader
device-dependent parameters, Table 210: Bootloader startup timings (ms),
04-Apr-2023 58 Table 211: USART bootloader minimum timings (ms), Table 212: USB bootloader
minimum timings (ms), Table 213: I2C bootloader minimum timings (ms)
– Section 3: Glossary
Added Section 88: STM32U535xx/545xx devices
Updated Table 3: Embedded bootloaders, Table 99: STM32G07xxx/08xxx bootloader
21-Jun-2023 59 versions, and Table 209: Bootloader device-dependent parameters.
Minor text edits across the whole document.
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and
improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on
ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order
acknowledgment.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or
the design of purchasers’ products.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other
product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.