2025-10-23 7:05 AM
Dear all,
I am using the cube programmer in order to set WRPA_PEND, WRPA_PSTRT and uncheck the unlock to actually lock the area defined by the WRPA field. It works fine and I can actually see that the memory region is protected.
I am unable to restore the situation and change back the unlock bit to 1 for this same region.
The cube programmer returns the following errors:
Error: Expected value for Option Byte "unlock_a": 0x1, found: 0x0
Error: Expected value for Option Byte "wrpa_pend": 0x0, found: 0x7F
Error: Option Byte Programming failed Or modified by application after OB_LAUNCH
The RDP level is set to 0xAA (not set at all nor changed).
Can anyone help me out with this issue?
2025-10-23 9:51 AM - edited 2025-10-23 9:52 AM
Hello @ivw, and welcome to ST Community!
Once the WRPA is locked by clearing the UNLOCK option bit, the area becomes write-protected and cannot be unlocked by simply setting the unlock bit back to 1. The unlock bit can only be set again when regressing from RDP Level 1 to Level 0 as stated in the reference manual section 3.7.2 Embedded flash memory write protection.
Best regards,