2025-01-22 01:58 PM
Hello
I'm working with a custom STM32WB55RG board which initially was working properly, reading documentation regarding failures and STM32WB Firmware Upgrade Service upgrade.
I tried to upgrade and follow the steps indicated, I also tried to follow several solutions that are in the forum but none of them succeeded to give me a solution.
I connect my card to the CubeProgrammer program.
16:37:27:317 : Disconnected
16:37:27:318 : Disconnected from device.
16:37:28:025 : UR connection mode is defined with the HWrst reset mode
16:37:28:135 : ST-LINK SN : 066AFF554857868367102407
16:37:28:135 : ST-LINK FW : V2J45M31
16:37:28:135 : Board : NUCLEO-WB55RG
16:37:28:135 : Voltage : 3.26V
16:37:28:135 : SWD freq : 4000 KHz
16:37:28:135 : Connect mode: Normal
16:37:28:135 : Reset mode : Software reset
16:37:28:135 : Device ID : 0x495
16:37:28:135 : Revision ID : Rev X
16:37:28:135 : flash loader C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin/FlashLoader/0x495.stldr is loaded
16:37:28:135 : Debug in Low Power mode enabled.
16:37:28:334 : UPLOADING OPTION BYTES DATA ...
16:37:28:334 : Bank : 0x00
16:37:28:334 : Address : 0x58004020
16:37:28:334 : Size : 96 Bytes
16:37:28:335 : Bank : 0x01
16:37:28:335 : Address : 0x58004080
16:37:28:335 : Size : 8 Bytes
16:37:28:335 : UPLOADING OPTION BYTES DATA ...
16:37:28:335 : Bank : 0x00
16:37:28:336 : Address : 0x58004020
16:37:28:336 : Size : 96 Bytes
16:37:28:336 : Bank : 0x01
16:37:28:336 : Address : 0x58004080
16:37:28:336 : Size : 8 Bytes
16:37:28:336 : UPLOADING ...
16:37:28:336 : Size : 4 Bytes
16:37:28:337 : Address : 0x58004080
16:37:28:337 : Read progress:
16:37:28:337 : Data read successfully
16:37:28:337 : Time elapsed during the read operation is: 00:00:00.001
16:37:28:337 : UPLOADING ...
16:37:28:337 : Size : 1024 Bytes
16:37:28:337 : Address : 0x8000000
16:37:28:337 : Read progress:
16:37:28:341 : Data read successfully
16:37:28:341 : Time elapsed during the read operation is: 00:00:00.007
Firmware Upgrade Services Login
I verify in the memory address that the fus is found.
Pin configuration
Now I am going to program the Wireless Stack but it fails to program.
LOG
16:47:20:713 : Opening and parsing file: stm32wb5x_BLE_Stack_full_extended_fw.bin
16:47:20:726 : Memory Programming ...
16:47:20:726 : File : stm32wb5x_BLE_Stack_full_extended_fw.bin
16:47:20:728 : Size : 184.18 KB
16:47:20:730 : Address : 0x080C5000
16:47:20:733 : Erasing memory corresponding to segment 0:
16:47:20:736 : fail @0xFEEEFEEE
16:47:20:736 : Memory Erase via FlashLoader!
16:47:20:737 : Memory erase...
16:47:20:764 : halt ap 0
16:47:20:786 : Erasing internal memory sectors [197 243]
16:47:20:786 : Init flashloader...
16:47:20:787 : halt ap 0
16:47:20:789 : run ap 0
16:47:20:789 : halt ap 0
16:47:20:789 : Loader sector erase...
16:47:20:799 : run ap 0
16:47:20:800 : halt ap 0
16:47:20:803 : Error: failed to erase memory
16:47:20:832 : Error: failed to erase memory
16:47:20:853 : RUNNING Program ...
16:47:20:854 : Address: : 0x080C5000
16:47:20:854 : STLink read from (0x080C5000) returned: 0x00000020
16:47:20:855 : 2nd try fail!
16:47:20:855 : STLink read from (0x080C5004) returned: 0x00000020
16:47:20:859 : 2nd try fail!
16:47:20:860 : Warning: The core is locked up
16:47:20:889 : Start operation achieved successfully
Another recurring error that I have is that the +M0 address is at 00000000, in one of the forums and solutions say that I program it at 00008000 in the memory address 0x5800040C.
I can program it but it gets deleted again.
2025-01-23 08:09 AM
Hello @Daniel_RH
Could you try using the stm32wb5x_BLE_Stack_full_extended_fw.bin from the last version of the STM32CubeWB (V1.21.0). on the address 0x080C7000 (using the STM32CubeProgrammer V2.18.0).
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.
2025-01-23 11:30 AM
Hi, following your instructions Use STM32CubeProgrammer V2.18.0 and stm32wb5x_BLE_Stack_full_extended_fw.bin from V1.21.0.
Process used to program
2.programming
initially I try to program by firware upgrade but it changes the configuration of the nBOOT0 pins to check which causes it to send the program to 0x08000000.
14:14:45 : Time elapsed during the read operation is: 00:00:00.006
14:16:23 : Old Firmware delete ...
14:16:23 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
14:16:23 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
14:16:23 : Reconnecting...
14:16:30 : Reconnected !
14:16:30 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
14:16:30 : Opening and parsing file: 0x495_FUS_Operator.bin
14:16:30 : Memory Programming ...
14:16:30 : File : 0x495_FUS_Operator.bin
14:16:30 : Size : 8.00 KB
14:16:30 : Address : 0x08000000
14:16:30 : Erasing memory corresponding to segment 0:
14:16:30 : Erasing internal memory sectors [0 1]
14:16:30 : Download in Progress:
14:16:30 : File download complete
14:16:30 : Time elapsed during download operation: 00:00:00.254
14:16:30 : Application is running, Please Hold on...
14:16:37 : Reconnecting...
14:16:38 : Reconnected !
14:16:38 : Warning: FUS_STATE_ERR_UNKNOWN
trying to program from memory and files
I reconfigure the pins
I try to program but it does not finish executing the wireless stack.
2025-01-24 06:56 AM
Hello @Daniel_RH
Could you please try using the ST-LINK embedded on your nucleo board instead of the J-LINK to see if it works fine or not. For J-LINK, can you try following this guide ST STM32WB - SEGGER Knowledge Base.
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.
2025-01-24 07:04 AM
I have tried both ST-LINK and J-LINK Plus but it still does not work.
I will follow the guide you provide, however I appreciate if you have another solution.
2025-01-24 07:28 AM - edited 2025-01-24 07:29 AM
Have you activated accidently the anti-rollback feature. If so, the stack reference version is considered as FFFFFFFF (while no stack installed and anti-rollback is activated), so no firmware update is allowed after that, and no recovery is possible at this point.
This wiki is available for more details.
Best Regard.
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.
2025-01-24 07:31 AM
No, before I had this problem I did some research and in many comments I saw regarding the activation of the anti-rollback.
So I was very careful to enable anti-rollback.
2025-01-24 07:59 AM
Could you try the same test on another board. Also, please send the values of all the option bytes for your Board.
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.
2025-01-24 08:21 AM - edited 2025-01-24 08:52 AM
I have 5 boards with the same customization, as I told you at the beginning, did not present any error but something made the BLE stopped working, as if the code was not executed.
Thinking that the error was due to deprogramming of the STACK and the FUS, we began to see the status of these looking if they were programmed.
When we tried to reprogram it, all this kind of failures started.
I have one card with FUS which is the one I am currently showing you and the others do not have FUS or STACK.
this is the pin configuration of another card
memory