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.