STM32 Readout Protection (RDP)

From Stm32World Wiki
Revision as of 02:54, 4 July 2021 by Lth (talk | contribs)
Jump to navigation Jump to search

All STM32 MCUs feature something known as Read Out Protection. It is probably a feature of the ARM Cortex core, since ST also provide something known as Proprietary Read Out Protection which is only available on certain STM32 models. In this document we will take a brief look at the basic Read Out Protection.

Test Example

Using the STM32CubeProgrammer we can read out the code (flash) of a STM32 MCU (in this case a Black Pill board).

Code Read.png

As can be seen, the internal flash content can be readily read out using the SWD.

Switching to the Option Byte tab, the following is shown:

Option Bytes Before.png

The RDP Open Byte contains "AA" which means Level 0 protection (or no protection at all).

We can now change the option byte to "BB" (Level 1 protection) and Apply the change.

Success.png

Switching back to the Memory and File viewer we now get:

Error.png