This document is an overview of STM32 proprietary code protection. It provides an explanation of the protection mechanism and its features, as well as how to protect the intellectual property code from being read out, debugged, or attacked by RAM Trojan code.
Software providers developing complex middleware solutions require mechanisms to protect their intellectual property (IP) code from unauthorized access. This document describes a solution based on STM32 features that limits access via a dedicated application programming interface (API) while preventing direct read access by debugger tools or RAM Trojan code.
The protection mechanism utilizes two levels: Global Read Out Protection (Global ROP) and IP Code Read Out Protection (IP ROP). The Flash memory is divided into areas for the primary application code, which contains the protected IP and an IAP layer, and user code. This setup ensures that once global protection is activated, the primary application can still load end-user applications without compromising the security of the core IP.
The mechanism protects IP code from being read by end-user code, debugger tools, or RAM Trojan code while still allowing the code to be called via a dedicated API.
The method uses Global Read Out Protection (Global ROP) to prevent direct reading by debugger tools or RAM Trojan code, and IP code Read Out Protection (IP ROP) to protect against end-user code.
Once Global ROP is activated, the user no longer has full control of the Flash for programming, so the primary application must embed an IAP Layer to load the end-user application.