Showing results for 
Search instead for 
Did you mean: 

STM32WB15CCU6: Cannot restore corrupt option bytes


For a project for one of our customers, we use STM32WB15CCU6 microcontrollers on a custom board. The boards are returning from the field with several of the option bytes of the microcontroller set to a different value than they were programmed with. We would like help in restoring them.


We don't use the bluetooth functionality of the STM32WB15CCU6; we just use it as a general purpose microcontroller; we don't have the wireless stack on the microcontroller.
We connect to the STM32WB15CCU6 via an ST-LINK, over SWD. We read out the option bytes with 'STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI  -c port=SWD -ob displ'. On the broken board, there are three option bytes different (compared to the known-good board). The values on broken board are in red, the working board is in green.
We tried to correct these bytes, by issueing the 'STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI  -c port=SWD -ob SBRSA_A=0x00  C2OPT=1 SBRSA_B=0x2' command, but this does not appear to work, and outputs:
Error: Expected value for Option Byte "c2opt": 0x1, found: 0x0
Error: Expected value for Option Byte "sbrsa_a": 0x0, found: 0x1F
Error: Expected value for Option Byte "sbrsa_b": 0x2, found: 0x0
Error: Option Byte Programming failed Or modified by application after OB_LAUNCH
Factory resetting (by issueing 'STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI -c port=SWD reset=HWrst -w32 0x5800040c 0x00008000') does not seem to help. After the supposed factory reset and power-cycling the board, if we read out that address, it still contains 0x00008000. If we read the FUS version in STM32CubeProgrammer, it returns all zeroes for the version:


If we read out the memory where the FUS should be, we get this (see image in attachment)
At this point, we're not sure how to proceed;  I think we've exhausted all options on We would like help to restore the option bytes to their original values.
ST Employee

Hello @DKM-JDV 

As you can see on the RM0473, SBRSA_A, SBRSA_B and C2OPT are read only. So, you can't reset them using Cube Programmer.

For the FUS you can follow the Wiki that you are referring to but you have to ensure that you didn't activated the anti-rollback mechanism before installing any Firmware or stack. In this case you may can't backup your MCU (More details are on the Wiki).

Best Regards.


To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you for the reply. We haven't activated the anti-rollback mechanism. Since we don't use the Bluetooth functionality, we haven't installed the stack.


We have contacted your support team via our vendor at EVB; we've shipped a defective device to Alan PORTE, but haven't got a reply yet.