Embedded flash memory (FLASH)
The flash memory is organized as follows:
•
A main memory block containing 128 pages of 2 Kbytes, each page with eight rows of
256 bytes.
•
An information block containing:
–
–
–
The memory organization is based on a main area and an information block as shown in the
table below.
Area
Main memory
Information block
3.3.2
Empty check
During the OBL phase, after loading all options, the flash memory interface checks whether
the first location of the main memory is programmed. The result of this check, in conjunction
with the BOOT0 and BOOT1 information, is used to determine where the system has to
boot from. It prevents the system to boot from the flash main memory area when, for
example, no user code is programmed.
The flash main memory empty check status can be read from the EMPTY bit in the
FLASH_ACR register. Software can modify the flash main memory empty status by writing
to the EMPTY bit.
The internal empty check flag (EMPTY bit in FLASH_ACR) is implemented to allow easy
programming of virgin devices by the bootloader. This flag is used when the BOOT0 pin
70/1306
System memory from which the CPU boots in system memory boot mode
This area is reserved and contains the bootloader used to reprogram the flash
memory through one of the following interfaces: USART1, USART2, I2C1, I2C2,
I2C3, SPI1, SPI2S2. It is programmed by STMicroelectronics when the device is
manufactured and protected against spurious write/erase operations. For further
details, refer to the application note STM32 microcontroller system memory boot
mode (AN2606).
1-Kbyte (128 double-word) OTP (one-time programmable) for user data
The OTP data cannot be erased and can be written only once. If only one bit is at
0, the entire double-word (64 bits) cannot be written anymore, even with the value
0x0000 0000 0000 0000.
Option bytes for user configuration
Table 4. Flash memory - Single bank organization
0x0800 0000 - 0x0800 07FF
0x0800 8000 - 0x0800 0FFF
0x0800 1000 - 0x0800 17FF
0x0800 1800 - 0x0800 1FFF
0x083 F000 - 0x0803 F7FF
0x083 F800 - 0x0803 FFFF
0x1FFF 0000 - 0x1FFF 6FFF
0x1FFF 7000 - 0x1FFF 73FF
0x1FFF 7800 - 0x1FFF 7FFF
Addresses
...
RM0461 Rev 5
Size (Kbytes)
2
2
2
2
...
2
Page 126
2
Page 127
28
System memory
1
OTP area
2
Option bytes
RM0461
Name
Page 0
Page 1
Page 2
Page 3
...
Need help?
Do you have a question about the STM32WLEx and is the answer not in the manual?