Difference between revisions of "STM32 Built-in Bootloader"

From Stm32World Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
[[Category:STM32]]
 
[[Category:STM32]]
All [[STM32]] devices have a pin labelled [[Boot0]] which serves one purpose only.  If left dangling or tied to [[GND]] the device will boot normally, but if pulled high the device will enter a special bootstrap mode.
+
All [[STM32]] devices 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 ==
 
== Further Reading ==
  
 
The various boot modes of [[STM32]] microcontrollers is described in details in [https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf AN2606 Application note - STM32 microcontroller system memory boot mode].
 
The various boot modes of [[STM32]] microcontrollers is described in details in [https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf AN2606 Application note - STM32 microcontroller system memory boot mode].

Revision as of 07:41, 26 November 2020

All STM32 devices 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.