Skip to main content
WWU.807
Associate II
October 30, 2019
Question

P-NUCLEO-WB55 does not working on DFU mode

Hi, All,

​

I want to use CubeMon-RF to monitor the USB dongle of the P-NUCLEO-WB55.

According to the Manual : STM32CubeMonitor-RF software tool for wireless performance measurements,

The USB dongle must be monitored using the VCP DEVICE link, and it need to update Firmware to use the example : ble_transparent_mode_vcp.

​

To update the USB dongle's firmware, I must use STM32CubeProg tool.

According to the manual : STM32CubeProgrammer software description,

USB dongle must use DFU mode for Firmware update, and I install DFU driver follow the Chapter 1.2.4.

And set the DFU mode according to this web page https://visualgdb.com/tools/STM32WBUpdater/connecting/.

​

However, when the device is plugged into the PC, the Window Device Manager does not detect any device, and the USB dongle is the same as STM32WB Nucleo.

And Win7 is the same as Win10.

May I ask how to solve this?

​

Thanks. ​

​

This topic has been closed for replies.

47 replies

Stecklo
Senior
November 6, 2019

@Remi QUINTIN​, I've connected dongle via SWD and fixed nSWBOOT, so now the dongle is able to connect via USB, but Windows can't recognise it properly (it says device descriptor request failed) while I'm able to connect NUCLEO-WB55 board both via STLINK and DFU

Stecklo
Senior
November 6, 2019

Some good/bad news. I've managed to make Windows recognize dongle as DFU by programming RDP=0xbb. Resetting it to 0xAA makes it unrecognizable again.

OK, now I'm able to connect directly via USB. But Programmer warns that "Device is under read out protection" and suggests to use -rdu, though it doesn't work.

-fwdelete works neither (Error: Could not start service since FUS is not in IDLE state)

So I'm trying to make

-fwupgrade stm32wb5x_FUS_fw.bin 0x080EC000 firstinstall=0 (the address is from Copro Wireless Binaries Release Notes)

and get Error: Could not execute fwupgrade command, Wrong address

I've tried

0x080FA000 (as suggested in oway1's comment, value is corrected to meet the 1Mb flash size), it doesn't work

Stecklo
Senior
November 6, 2019

I've made this

-ob pcrop_rdp=1

-ob rdp=0xbb

-ob rdp=0xaa

And now I'm not able to read or write flash

I'm a bit worried it's because of SFSA is now pointing zero

 Read Out Protection:
 
 RDP : 0xAA (Level 0, no protection)
 
 BOR Level:
 
 BOR_LEV : 0x0 (BOR Level 0 reset level threshold is around 1.7 V)
 
 User Configuration:
 
 nBOOT0 : 0x1 (nBOOT0=1)
 nBOOT1 : 0x1 (Boot from code area if BOOT0=0 otherwise system Flash)
 nSWBOOT0 : 0x1 (BOOT0 taken from PH3/BOOT0 pin)
 SRAM2RST : 0x1 (SRAM2 is not erased when a system reset occurs)
 SRAM2PE : 0x1 (SRAM2 parity check disable)
 nRST_STOP : 0x1 (No reset generated when entering the Stop mode)
 nRST_STDBY : 0x1 (No reset generated when entering the Standby mode)
 nRSTSHDW : 0x1 (No reset generated when entering the Shutdown mode)
 WWDGSW : 0x1 (Software window watchdog)
 IWGDSTDBY : 0x1 (Independent watchdog counter running in Standby mode)
 IWDGSTOP : 0x1 (Independent watchdog counter running in Stop mode)
 IWDGSW : 0x1 (Software independent watchdog)
 IPCCDBA : 0x3FFF (0x3FFF)
 
 Security Configuration Option bytes:
 
 ESE : 0x1 (Security enabled)
 SFSA : 0x0 (0x0)
 FSD : 0x0 (System and Flash secure)
 DDS : 0x1 (CPU2 debug access disabled)
 C2OPT : 0x1 (SBRV will address Flash)
 NBRSD : 0x0 (SRAM2b is secure)
 SNBRSA : 0x0 (0x0)
 BRSD : 0x0 (SRAM2a is secure)
 SBRSA : 0x0 (0x0)
 SBRV : 0x3FC00 (0x3FC00)
 
 PCROP Protection:
 
 PCROP1A_STRT : 0x1FF (0x8000FF8)
 PCROP1A_END : 0x0 (0x8000008)
 PCROP_RDP : 0x0 (PCROP zone is kept when RDP is decreased)
 PCROP1B_STRT : 0x1FF (0x8000FF8)
 PCROP1B_END : 0x0 (0x8000008)
 
 Write Protection:
 
 WRP1A_STRT : 0xFF (0x807F800)
 WRP1A_END : 0x0 (0x8000000)
 WRP1B_STRT : 0xFF (0x807F800)
 WRP1B_END : 0x0 (0x8000000)

Is thete any way to fix it?

Remi QUINTIN
ST Technical Moderator
November 6, 2019

-fwupgrade stm32wb5x_FUS_fw.bin 0x080EC000 firstinstall=0 (the address is from Copro Wireless Binaries Release Notes)

and get Error: Could not execute fwupgrade command, Wrong address

If you were not able to perform the FW delete command, the RF stack is located where you wanted to load the new FUS => Hence the error message.

Try to do perform the FW delete command either through SWD or DFU

 Please provide the secure option bytes => check the SFSA. At least , you cannot load anything above the SFSA location.

The FWdelete command is putting the SFSA location at the highest possible address to let more space for any code to be loaded.

Stecklo
Senior
November 6, 2019

-fwdelete via DFU

STM32_Programmer_CLI.exe -c port=usb1 -fwdelete
 -------------------------------------------------------------------
 STM32CubeProgrammer v2.2.0
 -------------------------------------------------------------------
 
 
 
USB speed : Full Speed (12MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in FS Mode
SN : 207138A03036
FW version : 0x011a
Device ID : 0x0495
Warning: Device is under Read Out Protection
Error: Could not start service since FUS is not in IDLE state
Error: Could not start service since FUS is not in IDLE state
Error: Could not start service since FUS is not in IDLE state
Error: fwdelete Operation Failure! Please, try again

-fwdelete via SWD

STM32_Programmer_CLI.exe -c port=swd mode=ur -fwdelete
 -------------------------------------------------------------------
 STM32CubeProgrammer v2.2.0
 -------------------------------------------------------------------
 
ST-LINK SN : 066EFF393738425043094308
ST-LINK FW : V2J33M25
Voltage : 3.18V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x495
Device name : STM32WBxx
Flash size : 1 MBytes
Device type : MCU
Device CPU : Cortex-M0+/M4
 
 
 
Memory Programming ...
Opening and parsing file: FUS_Operator.bin
 File : FUS_Operator.bin
 Size : 16882 Bytes
 Address : 0x08000000
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 4]
Error: failed to erase memory
 
 
Error: failed to erase memory
Error: Failed to download FUS operator!
Firmware delete n░1 failed after retrying!
 
 
Memory Programming ...
Opening and parsing file: FUS_Operator.bin
 File : FUS_Operator.bin
 Size : 16882 Bytes
 Address : 0x08000000
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 4]
Error: failed to erase memory
 
 
Error: failed to erase memory
Error: Failed to download FUS operator!
Firmware delete n░1 failed after retrying!
 
 
Memory Programming ...
Opening and parsing file: FUS_Operator.bin
 File : FUS_Operator.bin
 Size : 16882 Bytes
 Address : 0x08000000
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 4]
Error: failed to erase memory
 
 
Error: failed to erase memory
Error: Failed to download FUS operator!
Firmware delete n░1 failed after retrying!
Error: fwdelete Operation Failure! Please, try again

Remi QUINTIN
ST Technical Moderator
November 6, 2019

>-fwupgrade stm32wb5x_FUS_fw.bin 0x080EC000 firstinstall=0 (the address is from Copro Wireless Binaries Release Notes)

and get Error: Could not execute fwupgrade command, Wrong address

As you were not able to perform the FWdelete command, the RF stack was not removed and was still at the location you wanted to load the new FUS => hence the error message.

So look at the SFSA option byte and load the FUS below this address. Or try to perform the FWdelete function either through SWD and USB-DFU.

This command will move the SFSA location to the highest location possible to let more space to load any FW code.

Remi QUINTIN
ST Technical Moderator
November 6, 2019

​I just see your last message

-ob pcrop_rdp=1 not required as this is only if the  PCROx_START and _END were used to define a protected area.

-ob rdp=0xbb rdp=0xaa should be enough.

Now SFSA to 0 is a very bad news

Stecklo
Senior
November 6, 2019

Well. That's something.

By the way, RM0434 page 101 says

In case the Level 1 is configured and no PCROP areas are defined, it is mandatory to set PCROP_RDP bit to 1 (full mass erase when the RDP level is decreased from Level 1 to Level 0)

That is why I've made it this way.

Before this destructive action SFSA was 0xF6, so I shoud have been able to perform -fwupgrade at 0x080EC000 as it is 24 Kb.

As I've mentioned -fwdelete was not possible though DFU.

I have no evidence right now, but I've tried to make -fwdelete through SWD while I was not able to connect through DFU. And it showed some 100% progress bars as if everything is OK. Then showed "Reconnecting..." and failed with FUS_STATE_ERR_UNKNOWN or something like that.

Thanks anyway, I've got couple of extra MCUs. And now I know at least what I must not do

Stecklo
Senior
November 6, 2019

Ah, by the way, if BLE stack is preloaded in NUCLEO, is it also preloaded in every MCU?

Remi QUINTIN
ST Technical Moderator
November 6, 2019

>By the way, RM0434 page 101 says

>In case the Level 1 is configured and no PCROP areas are defined, it is mandatory to set PCROP_RDP bit to 1 (full mass erase when the RDP level is decreased from Level 1 to Level 0)

Indeed this is true but anytime I applied this sequence, I only used rdp=0xbb rdp=0xaa, I never set pcrop-rdp on my command line.

>Before this destructive action SFSA was 0xF6, so I should have been able to perform -fwupgrade at 0x080EC000 as it is 24 Kb.

Totally correct!

>Thanks anyway, I've got couple of extra MCUs. And now I know at least what I must not do

Sorry for this situation. I am quite puzzled to understand what makes this happen.

>Ah, by the way, if BLE stack is preloaded in NUCLEO, is it also preloaded in every MCU?

No only on the 2 boards of the STM32WB55 package. The MCUs are only delivered with the FUS loaded inside. No RF sack.