STM32 bootloader
FreeProgram STM32 microcontrollers without an SWD debugger
FreeFree tier
About STM32 bootloader
The STM32 bootloader is a small piece of software pre-programmed into the protected read-only memory of STM32 microcontrollers. It allows firmware upload via various communication protocols (UART, CAN, USB, I2C, SPI) without requiring an external SWD debugger. The bootloader is activated by setting BOOT0 and/or BOOT1 pins high during power-on or reset. To transfer new firmware, a host tool like stm32flash is used. This bootloader is especially useful for programming custom PCBs that lack debug connectors.
Key Features
Supports multiple communication protocols: UART, CAN, USB, I2C, SPI
Activation via BOOT0/BOOT1 pin state at boot
Protected read-only memory space prevents accidental overwrite
Allows firmware upload without external debugger
Works with host tool stm32flash for firmware transfer
Applicable to both low-end (UART only) and high-end microcontrollers
Pros & Cons
Pros
- Eliminates need for external programmer or debugger in many cases
- Free and built-in feature of all STM32 microcontrollers
- Multiple activation methods (pin strapping, capacitor, jump from app)
Cons
- Requires pin strapping or reset sequence to activate bootloader
- Not self-activating – requires reboot to enter bootloader mode
- Lower-end microcontrollers only support UART communication
- Communication uses a specific protocol requiring compatible host tool (e.g., stm32flash)
Best For
Programming STM32 microcontrollers on custom PCBs without SWD connectorField firmware updates via available communication interfacesBooting into bootloader from application code for self-programming
FAQ
What communication protocols does the STM32 bootloader support?
Low-end STM32 microcontrollers typically support only UART. Higher-end models can also use CAN, USART, USB, I2C, and SPI. Official documentation IDs are provided for each protocol.
How do I activate the bootloader?
The bootloader is activated by setting BOOT0 and/or BOOT1 pins high while the microcontroller boots or resets. Several methods are available, including using a GPIO pin with a capacitor, a button, or jumping to the bootloader from application code.