cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB15CCU6: Cannot restore corrupt option bytes

DKM-JDV
Associate

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.
 
DKMJDV_0-1711636830952.png
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:
 
OPTION BYTE PROGRAMMING VERIFICATION:
 
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:
 
DKMJDV_2-1711636923257.png

 

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 https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32WB_FUS#FAQ. We would like help to restore the option bytes to their original values.
3 REPLIES 3
STTwo-32
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.

STTwo-32

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.

Alan PORTE
ST Employee

Hello @DKM-JDV 

I'm the supporter who received your board.
First of all, my apologies for the delay. To be fully transparent, in order to avoid any mistake I had requested more info to the EBV contact on how to connect to the board and proceed with power supply. But I didn't receive feedback from him and thus the ticket he had created has been automatically closed.

I see the J11 connector on your board which I guess is for SWD connection, but as mentioned above, I would welcome confirmation and instruction in order to pursue my investigation.

Schematic and PCB layout can help as well.
In case you don't want to publish it publicly on this forum, then you can answer to my email I sent to you.

Best Regards,
Alan PORTE
ST MCU Support Team