STM32 Built-in Bootloader

From Stm32World Wiki
Revision as of 02:40, 6 August 2022 by Lth (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

All STM32 MCUs have a built-in bootloader which is stored in the internal boot ROM (system memory). This boot ROM is programmed by ST during manufacturing and can not be altered. The main purpose of the boot ROM is to allow applications to be written to the internal flash memory.

Depending on the exact STM32 device family, the internal boot ROM will allow flashing using a variety of different methods:

  • USART
  • CAN
  • USB
  • I2C
  • SPI

There are a number of different bootloader activation patterns described by ST in the reference documentation and in order to fully understand the operation of a specific STM32 microcontroller, it is necessary to consult that documentation. In most cases however, the Boot0 pin is the most interesting one. If left dangling or tied to GND the device will boot normally, but if pulled high the device will bootstrap from the internal boot ROM.

Further Reading

The various boot modes of STM32 microcontrollers is described in details in AN2606 Application note - STM32 microcontroller system memory boot mode.