2024-08-23 05:21 PM
Hi,
where do you set programmatically (perhaps through a preprocessor directive) the option to lock the micro to prevent read/download of the flashed code but while obviously still allow for firmware updates?
Also I could not seem to find any such option in CubeIDE. Is it available there or do I need to use the CubeProgrammer?
Thank you
Solved! Go to Solution.
2024-08-23 07:49 PM - edited 2024-09-04 11:43 PM
Use CubeProgrammer's Option Byte pane to set RDP options (Readout Protection). Make sure to carefully read up on this feature first, so you don't hurt yourself. Setting RDP level 2 is irreversible.
Update: here's another pitfall story, of a near-brick even with RDP level 1.
Update2:
AN5347: Arm® TrustZone® features for STM32L5 and STM32U5 Series
does a good job of scaring you with brick scenarios.
2024-08-23 06:43 PM - edited 2024-08-23 06:44 PM
Simpler perhaps to engage writing of Option Bytes in your own code, and either engage automatically based on a check if currently locked in RDP, or command initiated via your user interface, along with mass erase to clear RDP1
2024-08-23 07:49 PM - edited 2024-09-04 11:43 PM
Use CubeProgrammer's Option Byte pane to set RDP options (Readout Protection). Make sure to carefully read up on this feature first, so you don't hurt yourself. Setting RDP level 2 is irreversible.
Update: here's another pitfall story, of a near-brick even with RDP level 1.
Update2:
AN5347: Arm® TrustZone® features for STM32L5 and STM32U5 Series
does a good job of scaring you with brick scenarios.
2024-08-24 09:05 AM
Thank you both. :smiling_face_with_smiling_eyes: