cancel
Showing results for 
Search instead for 
Did you mean: 

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

ivw
Associate II

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 ACCEPTED SOLUTION

Accepted Solutions
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.

View solution in original post

5 REPLIES 5
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.
ivw
Associate II

Hi @STackPointer64 

thank you very much for your reply. My current RDP level is 0 I never changed the RDP level to 1 in the first place. Is there a guide that tell you how to do this setup step by step in a procedural way?

 

 

ivw
Associate II

I did a regression from RDP 1 (value 0xDC) to level 0 (0xAA) and then I tried to check the unlock bit but it gives me the same error as I state before.

ivw
Associate II

Hi @STackPointer64 

While I was trying I never activated RDP level 1 and despite that I cannot change the unlock bit back to 1. Now I tried to set RDP level to 1 with a password and I am able to regress back to level 0 (0xAA). Despite this procedure, I am still unable to set unlock bit back to 1 and change WRPA values.

 

 

Dear @STackPointer64,

I tried with a regression from RDP 1 to 0 but it doesn't work. I need to point out though that we are using the STM32WBA5MMG module in our project.