cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to set unlock in option bytes once is set in STM32WBA55

ivw
Visitor

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?

1 REPLY 1
STackPointer64
ST Employee

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,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.