This programming manual describes how to program the STM32F101xF/G and STM32F103xF/G Flash memory of XL-density microcontrollers
This manual explains how to program the Flash memory of STM32F101xF/G and STM32F103xF/G microcontrollers using in-circuit or in-application methods. It covers Flash access, programming, erasing, protection, and register management. The dual-bank architecture supports read-while-write capability. Programming requires the internal RC oscillator (HSI) to be ON. The document includes register descriptions and detailed procedures for both banks and option bytes.
The Flash memory is organized into main memory blocks and an information block, with system memory for booting and option bytes for configuration. Read/write protections and option byte block write protection are supported. Flash operations can be performed using JTAG, SWD, or boot loader interfaces, with read operations stalling during write/erase operations.
| Flash Memory Size | Up to 1 Mbytes |
|---|---|
| Dual Bank Architecture | Bank 1: 512 Kbytes, Bank 2: up to 512 Kbytes |
| Flash Interface | AHB protocol with prefetch buffer |
| Programming Methods | In-circuit (ICP) or in-application (IAP) |
You can program using in-circuit programming (ICP) via JTAG, SWD, or boot loader, or in-application programming (IAP) using any supported interface like UART, I2C, or SPI.
It allows read-while-write capability: while one bank is being read or programmed, the other bank can be accessed without waiting for the operation to complete.
The internal RC oscillator (HSI) must be ON for write and erase operations.