Difference between revisions of "STM32 Readout Protection (RDP)"
Line 7: | Line 7: | ||
[[File:Code Read.png|800px]] | [[File:Code Read.png|800px]] | ||
+ | |||
+ | 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: | ||
+ | |||
+ | [[File:Option Bytes Before.png|800px]] | ||
+ | |||
+ | 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. | ||
+ | |||
+ | [[File:Success.png|400px]] | ||
+ | |||
+ | Switching back to the Memory and File viewer we now get: | ||
+ | |||
+ | [[File:Error.png|400px]] |
Revision as of 02:54, 4 July 2021
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).
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:
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.
Switching back to the Memory and File viewer we now get: