Embedded Flash memory interface RM0090
76/1731 DocID018909 Rev 11
3.4 Embedded Flash memory in STM32F42xxx and
STM32F43xxx
The Flash memory has the following main features:
• Capacity up to 2 Mbyte with dual bank architecture supporting read-while-write
capability (RWW)
• 128 bits wide data read
• Byte, half-word, word and double word write
• Sector, bank, and mass erase (both banks)
• Dual bank memory organization
The Flash memory is organized as follows:
– For each bank, a main memory block (1 Mbyte) divided into 4 sectors of 16
Kbytes, 1 sector of 64 Kbytes, and 7 sectors of 128 Kbytes
– System memory from which the device boots in System memory boot mode
– 512 OTP (one-time programmable) bytes for user data
The OTP area contains 16 additional bytes used to lock the corresponding OTP
data block.
– Option bytes to configure read and write protection, BOR level, watchdog, dual
bank boot mode, dual bank feature, software/hardware and reset when the device
is in Standby or Stop mode.
• Dual bank organization on 1 Mbyte devices
The dual bank feature on 1 Mbyte devices is enabled by setting the DB1M option bit.
To obtain a dual bank Flash memory, the last 512 Kbytes of the single bank (sectors
[8:11]) are re-structured in the same way as the first 512 Kbytes.
The sector numbering of dual bank memory organization is different from the single
bank: the single bank memory contains 12 sectors whereas the dual bank memory
contains 16 sectors (see Table 7: 1 Mbyte Flash memory single bank vs dual bank
organization (STM32F42xxx and STM32F43xxx)).
For erase operation, the right sector numbering must be considered according the
DB1M option bit.
– When the DB1M bit is reset, the erase operation must be performed on the default
sector number.
– When the DB1M bit is set, to perform an erase operation on bank 2, the sector
number must be programmed (sector number from 12 to 19). Refer to FLASH_CR
register for SNB (Sector number) configuration.
Refer to Table 8: 1 Mbyte single bank Flash memory organization (STM32F42xxx and
STM32F43xxx) and Table 9: 1 Mbyte dual bank Flash memory organization (STM32F42xxx
and STM32F43xxx) for details on 1 Mbyte single bank and 1 Mbyte dual bank
organizations.