Embedded Flash memory (FLASH)
3.3
FLASH functional description
3.3.1
Flash memory organization
The Flash memory has the following main features:
•
Capacity up to 2 Mbytes, in Single-bank mode (read width of 128 bits) or in Dual-bank
mode (read width of 64-bits)
•
Supports dual boot mode thanks to the BFB2 option bit (only in Dual-bank mode)
•
Dual-bank mode when DBANK bit is set:
–
–
–
–
•
Single-bank mode when DBANK is reset:
–
–
–
–
The Flash memory is organized as follows:
For STM32L4Rxxx and STM32L4Sxxx devices:
•
A main memory block organized depending on the dual-bank configuration bit:
–
–
•
Dual-bank organization on 1 Mbyte devices
The dual-bank feature on 1 Mbyte devices is enabled by setting the DB1M option bit.
The dual-bank memory organization is different from the single-bank: the single-bank
memory contains 128 pages of 8 Kbytes whereas the dual-bank memory each bank
contains 128 pages of 4 Kbytes.
For erase operation, the right page numbering and address must be considered
according to the DB1M option bit.
–
–
For STM32L4P5xx and STM32L4Q5xx devices
•
A main memory block organized depending on the dual-bank configuration bit:
–
114/2301
2 Mbytes organized in 2 banks for main memory
Page size of 4 Kbytes
72 bits wide data read (64 bits plus 8 ECC bits)
Bank and Mass erase
2 Mbytes organized in one single-bank for main memory
Page size of 8 Kbytes
144 bits wide data read (128 bits plus 2x8 ECC bits)
Mass erase
When dual-bank is enabled (DBANK bit set), the Flash is divided in 2 banks of
1 Mbyte, and each bank is organized as follows:
The main memory block containing 256 pages of 4 Kbytes
Each page is composed of 8 rows of 512 bytes
When dual-bank is disabled (DBANK bit reset), the main memory block is
organized as one single-bank of 2 Mbytes as follows:
The main memory block containing 256 pages of 8 Kbytes
Each page is composed of 8 rows of 1024 bytes
When the DB1M bit is reset, the erase operation must be performed on the
Bank 1.
When the DB1M bit is set, to perform an erase operation on Bank 2, the page
number must be programmed (page number from 0 to 127) on Bank 2.
When dual-bank is enabled (DBANK bit set), the Flash is divided in 2 banks of
512 Kbytes, and each bank is organized as follows:
RM0432 Rev 6
RM0432
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?