STM32WB stack programming/update from cube programmer gui-cli in swd-dfu mode don't work in all mode
HI
I am doing experiments with board P-Nucleo WB55, in particular I wanted to update the ble firmware in the allowed ways:
1 - Connection in dfu mode via usb with the cube programmer gui
2 - Connection in swd mode with the cube programmer gui
3 - Connection in dfu mode with cube programmer cli
4 - Connection in swd mode with cube porogrammer cli
Initially I was able to connect in dfu mode (with cn7.5 and cn7.7 in short circuit and jp1 on usb mcu), and in device manager I saw the dfu device, from a certain point on it no longer recognizes the dfu mode, not even on another pc where a similar card is recognized correctly, and in the device manager nothing happens when I connect it. This prevents me from doing experiments 1 and 3 listed above.
For experiments 2 I do everything correctly, so I can update both the fus and the stack, and if I run delete stack and try to load a ble firmware it doesn't work, so it delete the stack as it should be , and if I run update stack and then load a blue firmware it runs correctly.
For the experiment at point 4 I can't do anything, or rather, when the stack is on the board, and I execute the firmware update command it gives me error messages but it seems to execute correctly, but having doubts about the messages I don't know if he has actually rewritten the stack or if he is running the one already present.
If I execute the command with the stack deleted (deleting it from cube programmer gui then it always gives me error, either if I choose the firstinstall option to 1 or 0. So in this situation where I am emulating the production microcontrollers without a stack to update via cli in an automated way I can't do it.
Ultimately, how can I make it work in dfu mode?
How can I update the stack in swd mode?
How can I do both actions correctly with programmer gui and with programmer cli
The cli command follows, both with stack present and with stack not present.
COMMAND CLI WITH NO STACK INTALLED:
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=swd mode=UR -fwupgrade C:\STM32Cube_FW_WB_V1.11.1\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x\stm32wb5x_BLE_Stack_full_fw.bin Install@0x080CA000 firstinstall=1 startstack=1 -v -startwirelessstack
-------------------------------------------------------------------
STM32CubeProgrammer v2.7.0
-------------------------------------------------------------------
ST-LINK SN : 0677FF393132534E43051442
ST-LINK FW : V2J37M27
Board : P-NUCLEO-WB55
Voltage : 3.27V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x495
Revision ID : Rev Y
Device name : STM32WB5x
Flash size : 1 MBytes
Device type : MCU
Device CPU : Cortex-M4
Error: The fwupgrade command you trying to perform (-fwupgrade "C:\STM32Cube_FW_WB_V1.11.1\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x\stm32wb5x_BLE_Stack_full_fw.bin") is missing some arguments. Please refer to the Help to see how to use it.
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
Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
Memory Programming ...
Opening and parsing file: 0x495_FUS_Operator.bin
File : 0x495_FUS_Operator.bin
Size : 8 KBytes
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.290
Application is running, Please Hold on...
Reconnecting...
Reconnected !
Error: FUS_STATE_IMG_NOT_FOUND
Error: startwirelessStack Operation Failure! Please, try again
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>
COMMAND CLI WITH STACK INTALLED:
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=swd mode=UR -fwupgrade C:\STM32Cube_FW_WB_V1.11.1\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x\stm32wb5x_BLE_Stack_full_fw.bin Install@0x080CA000 firstinstall=1 startstack=0 -v -startwirelessstack
-------------------------------------------------------------------
STM32CubeProgrammer v2.7.0
-------------------------------------------------------------------
ST-LINK SN : 0677FF393132534E43051442
ST-LINK FW : V2J37M27
Board : P-NUCLEO-WB55
Voltage : 3.27V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x495
Revision ID : Rev Y
Device name : STM32WB5x
Flash size : 1 MBytes
Device type : MCU
Device CPU : Cortex-M4
Error: The fwupgrade command you trying to perform (-fwupgrade "C:\STM32Cube_FW_WB_V1.11.1\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x\stm32wb5x_BLE_Stack_full_fw.bin") is missing some arguments. Please refer to the Help to see how to use it.
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
Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
Memory Programming ...
Opening and parsing file: 0x495_FUS_Operator.bin
File : 0x495_FUS_Operator.bin
Size : 8 KBytes
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.297
Application is running, Please Hold on...
Reconnecting...
Reconnected !
FusStartWS activated successfully
startwirelessStack command execution finished
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>
Best regards,
Luigi Berardi
