2.4.1 Read protection
The read protection is activated by setting the RDP option byte and then, by applying a
system reset to reload the new RDP option byte.
Note: If the read protection is set while the debugger is still connected through JTAG/SWD, apply a
POR (power-on reset) instead of a systemreset (without debugger connection).
Once the protection byte has been programmed:
● Main Flash memory read access is not allowed except for the user code (when booting
from main Flash memory itself with the debug mode not active).
● Pages 0-3 (for low- and medium-density devices), or pages 0-1 (for high-density and
connectivity line devices) are automatically write-protected. The rest of the memory can
be programmed by the code executed from the main Flash memory (for IAP, constant
storage, etc.), but it is protected against write/erase (but not against mass erase) in
debug mode or when booting from the embedded SRAM。