STM32 How to flash
When first getting involved with STM32, one of the first road blocks is often the sheer number of different choices. There are literally hundreds of different STM32 micro controllers and at first it appears extremely overwhelming. That is, up until you realize that there are only a few (4-5) families and the rest of the choices are up to speed and IO. When it comes to flashing, the number of options are just as overwhelming and confusing. This page is an attempt to clear up that confusion.
The first thing to realize is that every single STM32 micro controller has to a built-in boot ROM which is programmed at the factory. This ROM can never be changed. When a STM32 is powered up, it will pull the Boot0 pin low with a weak internal resistor and then check the level of the pin. If the pin is low, the user code stored in flash will be executed, but if the pin is high, the internal factory bootloader will be executed.
The exact features of the bootloader depends on the STM32 family. Some features are available on every single STM32 device, while others are only available on a subset of STM32s.
The following (incomplete) table attempts to summarize the bootloader features in the different STM32 devices:
Devices | xxx | UART | I2C | SPI | CAN | DFU |
---|---|---|---|---|---|---|
STM32F1 | X |