cancel
Showing results for 
Search instead for 
Did you mean: 

USB dongle CLI firmware doesn't work

TWirt.15
Associate II

I couldn't get the CLI application running on the P-NUCLEO-WB55.USBDongle. I updated the FUS firmware according to ../STM32WB_Copro_Wireless_Binaries/Release_Notes.html and installed the stm32wb5x_Thread_FTD_fw.bin on CPU2. The FUS update exited with:

FUS status is FUS_IMAGE_NOT_AUTHENTIC

Error: Firmware not authentic!

but STM32_Programmer_CLI.exe -c port=usb1 -r32 0x20030030 1 does return the right code (01000200). Flashing the stm32wb5x_Thread_FTD_fw.bin was successful. However, when I flash the ..\STM32Cube_FW_WB_V1.3.0\Projects\P-NUCLEO-WB55.USBDongle\Applications\Thread\Thread_Cli_Cmd\Binary\Thread_Cli_Cmd_reference.hex binary, the system doesn't seem to work. Windows is not able to detect the USB device. Error 43 (Device descriptor request error). The same procedure on the Nucleo64 (with the correspondig binary) worked fine and the CLI is available trough the ST-Link VCP.

1 ACCEPTED SOLUTION

Accepted Solutions

I coverted the SW4STM32 project to a CubeIDE project using CubeIDE and compiled the project again. After downloading the resulting binary to 0x08000000, the dongle is detected as USB VCP and the CLI seems to work. As far as I can say, the binary delivered in ..\STM32Cube_FW_WB_V1.3.0\Projects\P-NUCLEO-WB55.USBDongle\Applications\Thread\Thread_Cli_Cmd\Binary\Thread_Cli_Cmd_reference.hex is faulty.

View solution in original post

9 REPLIES 9
Stecklo
Senior

I had the same struggle recently, but I've ended up with my Dongle broken

Read this topic, maybe it will help you.

Setting RDP=0xbb makes DFU recognizable as a USB device

Remi QUINTIN
ST Employee

>but STM32_Programmer_CLI.exe -c port=usb1 -r32 0x20030030 1 does return the right code (01000200).

What is the value?

Was it the first time you tried to upgrade the FUS?

FUS status is FUS_IMAGE_NOT_AUTHENTIC error message could happen when the FUS is already up to date.

Did you perform the FWdelete command at first?

Could you download the secure option bytes like SFSA, SBRV, ....?

Could you send a log file with you sequence?

Did move the switch back to the non-programming position before launching the application (after reset)?

Hello Stecklo, thank you for your reply. Unfortunately the setting RDP bits doesn't change the behaviour, also the topic you mentioned does not solve the problem.

Hello Remi,

I had to update the FUS because the reply on "STM32_Programmer_CLI.exe -c port=usb1 -r32 0x20030030 1" was 0x00050300. As mentioned, it is now 0x01000200.

The security option bytes look fine. According to STM32CubeProgrammer the values are as follows:

SBRV: 0x27c00

SFSA: 0x9F

I did the whole sequence again according to the Release_Notes.html. This time I already had the right version of FUS installed (0x01000200):

C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=usb1 -fwdelete

     -------------------------------------------------------------------

                      STM32CubeProgrammer v2.2.1

     -------------------------------------------------------------------

USB speed  : Full Speed (12MBit/s)

Manuf. ID  : STMicroelectronics

Product ID : DFU in FS Mode

SN         : 206B388A3036

FW version : 0x011a

Device ID  : 0x0495

Device name : STM32WBxx

Flash size : 1 MBytes

Device type : MCU

Device CPU : Cortex-M0+/M4

FUS state is FUS_IDLE

FUS status is FUS_NO_ERROR

Deleting firmware ...

Firmware delete finished

fwdelete command execution finished

C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=usb1 -r32 0x20030030 1

     -------------------------------------------------------------------

                      STM32CubeProgrammer v2.2.1

     -------------------------------------------------------------------

USB speed  : Full Speed (12MBit/s)

Manuf. ID  : STMicroelectronics

Product ID : DFU in FS Mode

SN         : 206B388A3036

FW version : 0x011a

Device ID  : 0x0495

Device name : STM32WBxx

Flash size : 1 MBytes

Device type : MCU

Device CPU : Cortex-M0+/M4

Reading 32-bit memory content

 Size         : 4 Bytes

 Address:     : 0x20030030

0x20030030 : 01000200

C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=usb1 -fwupgrade D:\STM32Cube_FW_WB_V1.3.0\Projects\STM32WB_Copro_Wireless_Binaries\stm32wb5x_FUS_fw.bin 0x080EC000 firstinstall=0

     -------------------------------------------------------------------

                      STM32CubeProgrammer v2.2.1

     -------------------------------------------------------------------

USB speed  : Full Speed (12MBit/s)

Manuf. ID  : STMicroelectronics

Product ID : DFU in FS Mode

SN         : 206B388A3036

FW version : 0x011a

Device ID  : 0x0495

Device name : STM32WBxx

Flash size : 1 MBytes

Device type : MCU

Device CPU : Cortex-M0+/M4

FUS state is FUS_SERVICE_ONGOING

FUS status is FUS_IMAGE_NOT_FOUND

FUS state is FUS_IDLE

FUS status is FUS_NO_ERROR

Old Firmware delete ...

Deleting firmware ...

Firmware delete finished

FUS state is FUS_SERVICE_ONGOING

FUS status is FUS_IMAGE_NOT_FOUND

FUS state is FUS_IDLE

FUS status is FUS_NO_ERROR

Download firmware image at address 0x80ec000 ...

Memory Programming ...

Opening and parsing file: stm32wb5x_FUS_fw.bin

 File         : stm32wb5x_FUS_fw.bin

 Size         : 24492 Bytes

 Address      : 0x080EC000

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [236 241]

erasing sector 0236 @: 0x080ec000 done

[...]

erasing sector 0241 @: 0x080f1000 done

Download in Progress:

██████████████████████████████████████████████████ 100%

File download complete

Time elapsed during download operation: 00:00:00.730

FUS state is FUS_IDLE

FUS status is FUS_NO_ERROR

Firmware Upgrade process started ...

Updating firmware ...

Waiting for firmware upgrade end

FUS state is FUS_UPGRADE_ONGOING

FUS status is FUS_NO_ERROR

FUS state is FUS_UPGRADE_ONGOING

FUS status is FUS_IMAGE_NOT_AUTHENTIC

Error: Firmware not authentic!

C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=usb1 -fwupgrade D:\STM32Cube_FW_WB_V1.3.0\Projects\STM32WB_Copro_Wireless_Binaries\stm32wb5x_Thread_FTD_fw.bin 0x0809F000 firstinstall=1

     -------------------------------------------------------------------

                      STM32CubeProgrammer v2.2.1

     -------------------------------------------------------------------

USB speed  : Full Speed (12MBit/s)

Manuf. ID  : STMicroelectronics

Product ID : DFU in FS Mode

SN         : 206B388A3036

FW version : 0x011a

Device ID  : 0x0495

Device name : STM32WBxx

Flash size : 1 MBytes

Device type : MCU

Device CPU : Cortex-M0+/M4

Download firmware image at address 0x809f000 ...

Memory Programming ...

Opening and parsing file: stm32wb5x_Thread_FTD_fw.bin

 File         : stm32wb5x_Thread_FTD_fw.bin

 Size         : 346752 Bytes

 Address      : 0x0809F000

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [159 243]

erasing sector 0159 @: 0x0809f000 done

[...]

erasing sector 0243 @: 0x080f3000 done

Download in Progress:

██████████████████████████████████████████████████ 100%

File download complete

Time elapsed during download operation: 00:00:08.702

FUS state is FUS_IDLE

FUS status is FUS_NO_ERROR

Firmware Upgrade process started ...

Updating firmware ...

Waiting for firmware upgrade end

FUS state is WIRELESS_STACK_UPGRADE_ONGOING

FUS status is FUS_NO_ERROR

FUS state is WIRELESS_STACK_UPGRADE_ONGOING

FUS status is FUS_NO_ERROR

FUS state is WIRELESS_STACK_UPGRADE_ONGOING

FUS status is FUS_NO_ERROR

FUS state is WIRELESS_STACK_UPGRADE_ONGOING

FUS status is FUS_NO_ERROR

FUS state is WIRELESS_STACK_UPGRADE_ONGOING

FUS status is FUS_NO_ERROR

FUS state is FUS_ERROR

FUS status is FUS_NOT_RUNNING

Firmware Upgrade Success

After this sequence I downloaded the STM32Cube_FW_WB_V1.3.0\Projects\P-NUCLEO-WB55.USBDongle\Applications\Thread\Thread_Cli_Cmd\Binary\Thread_Cli_Cmd_reference.hex via STM32CubeProgrammer and set SW2 back to IO mode. Still the device is not recognized as a valid USB device (I would expect a CDC/VCP).

Remi QUINTIN
ST Employee

Looking at the log, I can say that the FUS and the RF stack are correctly installed.

The error resulting from the FUS update is only due to the fact that the FUS was already up to date.

If the binary was loaded at 0x08000000, there should be no issue.

I assume you reset (SW1) correctly.

After loading the HEX file to 0x08000000 I reset the switch from the Boot 0 to the IO position and tried to connect to the dongle on two different machines. Both of them are detecting the device as unknown USB device (error requesting device descriptor). Is there anything else I can try?

Is there an easy way to covert the sample projects into TrueStudio projects? If yes, I could try to compile the projects on my local machine. Maybe it's an issue with the binary.

I coverted the SW4STM32 project to a CubeIDE project using CubeIDE and compiled the project again. After downloading the resulting binary to 0x08000000, the dongle is detected as USB VCP and the CLI seems to work. As far as I can say, the binary delivered in ..\STM32Cube_FW_WB_V1.3.0\Projects\P-NUCLEO-WB55.USBDongle\Applications\Thread\Thread_Cli_Cmd\Binary\Thread_Cli_Cmd_reference.hex is faulty.

Remi QUINTIN
ST Employee

​Good that you manage to solve your issue. Just annoyed by the fact that  .hex file provided in the official WB package is not working as expected. I will investigate this.

TWirt.15
Associate II

Hello Remi,

I got some problems to get a Thread based project running with the CubeIDE from scratch (using the integrated CubeMX). I think this isn't fully supported yet. I decided to use one of the demo projects from the STM32CUbeWB support package. When I tried to download the package again (to have a clean version) I recognized that the Version 1.3.0 which I used before isn't available anymore. Is there a reason for this? Should I use Version 1.2.0?