Question
STM32WB55: Error when programming SafeBoot
Hello,
We have a custom board with a STM32WB55VGY MCU on it.
Originally, the FUS version that runs on it is 1.2.0 and we would like to upgrade the FUS and flash the latest version of the Wireless stack (BLE stack full) and safe boot.
So, using the STM32_Programmer_CLI we run the following commands:
- STM32_Programmer_CLI -c port=swd -startfus
- STM32_Programmer_CLI -c port=SWD -r32 0x20010010 1
- Read 0x20010010 : 01020000 → FUS version 1.2.0
- STM32_Programmer_CLI -c port=SWD -fwupgrade stm32wb5x_FUS_fw.bin 0x080EE000 firstinstall=0
- STM32_Programmer_CLI -c port=SWD -r32 0x20010010 1
- Read 0x20010010 : 02020000 → FUS version 2.2.0
- STM32_Programmer_CLI -c port=SWD -fwupgrade stm32wb5x_Safeboot_fw.bin 0x080F2000 firstinstall=0
- STM32_Programmer_CLI -c port=SWD -fwupgrade stm32wb5x_BLE_Stack_full_fw.bin 0x080D0000 firstinstall=0
All commands run successfully except for the SafeBoot where it returns the following error:
Error: FUS_ERROR_INVALID_OB: Option bytes and UFB values do not match.
Error:
Old Firmware delete failed
Do you have any idea that can explain this error?
Am I doing it wrong?
The complete log of the safeboot upgrade is:
STM32_Programmer_CLI -c port=SWD -fwupgrade stm32wb5x_Safeboot_fw.bin 0x080F2000 firstinstall=0
-------------------------------------------------------------------
STM32CubeProgrammer v2.23.0
-------------------------------------------------------------------
ST-LINK SN : 002000433233510639363634
ST-LINK FW : V3J16M7B5S1
Board : STLINK-V3MODS
Voltage : 3.29V
SWD freq : 8000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x495
Revision ID : Rev X
Device name : STM32WB5x/35xx
NVM size : 1 MBytes
Device type : MCU
Device CPU : Cortex-M4
BL Version : 0xD5
Debug in Low Power mode enabled
Old wireless stack delete ...
Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
Warning: Option Byte: nboot0, value: 0x1, was not modified.
Warning: Option Byte: nboot1, value: 0x1, was not modified.
Warning: Option Bytes are unchanged, Data won't be downloaded
Time elapsed during option Bytes configuration: 00:00:00.000
Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
Opening and parsing file: 0x495_FUS_Operator.bin
Memory Programming ...
File : 0x495_FUS_Operator.bin
Size : 8.00 KB
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 1]
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:00.213
Application is running, Please Hold on...
Reconnecting...
Reconnected !
Error: FUS_ERROR_INVALID_OB: Option bytes and UFB values do not match.
Error:
Old Firmware delete failed
