Datasheet
DocID024647 Rev 1 37/138
RM0352 Embedded Flash memory
137
Figure 4. Flash wrapper state machine operation
6.5 Flash protection (ready state)
After the recall, the 64-bit key stored in the Flash will be read by the Flash wrapper (one idle
cycle between the two 32-bit reads). The Flash readout protection code is at the address
0x1001_FFF8 (this must match UNLOCKM register value) and 0x1001_FFFC (this must
match UNLOCKL register value) of the Flash. The AHB read accesses to the memory are
stalled (not ready) if they are intended for the Flash while fetching the two unlock codes from
Flash. Both 64-bit keys (the APB and Flash code) are compared only once when the Cortex-
M0 is halted.
In locked state, the following restrictions apply:
• Read access from the AHB will result in fixed data value of 0x0, HRESP will return
ERROR.
• Full erase is allowed, partial erase is not allowed (to avoid erasure of the access key
without erasure of the whole program). Table 20: Flash command register on page 34
gives an overview of the possible commands when Flash lock is active.
32:(5 3'0 5(&$//
5($'<
5($'
:5,7(
(5$6(
5($'<
$0
Table 24. Flash locking modes
CPU IN HALT Register match Flash access
0-Unlocked
1NoLocked
1 Yes Unlocked