Flash program memory and data EEPROM (FLASH) RM0367
72/1043 RM0367 Rev 7
When entering System memory, you can either execute the bootloader (for Flash update) or
execute Dual Bank Jump (see Table 11).
When protection level2 is enabled, the bootloader is never executed to perform a Flash
update.
When the conditions a, b, and c described below are fulfilled, it is equivalent to configuring
boot pins for System memory boot (BOOT0 = 1 and BOOT1 = 0). In this case when
protection level2 is disabled, normal bootloader operations are executed.
a) BFB2 bit is set.
b) Both banks do not contain valid code.
c) Boot pins configured as follows: BOOT0 = 0 and BOOT1 = x.
When the BFB2 bit is set, and Bank 2 and/or Bank 1 contain valid user application code, the
Dual Bank Boot is always performed (bootloader always jumps to the user code).
Consequently, if you have set the BFB2 bit (to boot from Bank 2) then, to be able to execute
the bootloader code for Flash update when protection level2 is disabled, you have to:
a) Set the BFB2 bit to 0, BOOT0 = 1 and BOOT1 = 0 or,
b) Program the content of address 0x0801 8000/0x0801 0000 (base address of
Bank2) and 0x0800 0000 (base address of Bank1) to 0x0.
3.3.3 Reading the NVM
Protocol to read
To read the NVM content, take any address from Section 3.3.1: NVM organization. The
clock of the memory interface must be running. (see MIFEN bit in Section 7.3.13: AHB
peripheral clock enable register (RCC_AHBENR)).
Depending on the clock frequency, a 0 or a 1 wait state can be necessary to read the NVM.
The user must set the correct number of wait states (LATENCY bit in the FLASH_ACR
register). No control is done to verify if the frequency or the power used is correct, with
respect to the number of wait states. A wrong number of wait states can generate wrong
read values (high frequency and 0 wait states) or a long time to execute a code (low
frequency with 1 wait state).
2
0
X 0 User Flash memory
User Flash memory Bank1 is selected as the
boot area.
1 1 User Flash memory
0 1 User Flash memory
1
X 0 System memory
Boot on System memory to execute dual bank
boot mechanism. If Bank 2 isn’t valid, it jumps to
Bank 1.
1 1 System memory
0 1 System memory
Table 11. Boot pin and BFB2 bit configuration (continued)
Protection
level
BFB2
bit
Boot mode
selection
Boot mode Aliasing
nBOOT1
option
bit
BOOT0
pin