cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55REV6 custom target board BLE wireless stack program issue.

VDesa.1
Associate III

I have STM32WB55REV6 based custom target board which contains 512KB flash. I tried to

download FUS and BLE stack, but it seems like did not programmed correctly and Host controller (CM4) is in wait for event from network processor (CM0). Following batch file command sequence and address used for target STM32WB55REV6 as per release note.

0693W000004GtA9QAK.jpg

SET BIN=STM32WB5x/stm32wb5x_FUS_fw_1_0_2.bin
SET STACK=STM32WB5x/stm32wb5x_BLE_Stack_full_fw.bin
 
STM32_Programmer_CLI.exe -c port=SWD -fwdelete
timeout 2 >NUL
STM32_Programmer_CLI.exe -c port=SWD -r32 0x20030030 1
timeout 2 >NUL
STM32_Programmer_CLI.exe -c port=SWD -fwupgrade "%BIN%" 0x0807A000 firstinstall=0 -v
timeout 2 >NUL
STM32_Programmer_CLI.exe -c port=SWD -fwupgrade "%STACK%" 0x08057000 firstinstall=0 -v
 
pause

I have tried with firstinstall = 1 flag too.

I have also attached the log.txt file of executed commands from bat

Request to guide for the same.

11 REPLIES 11
Remi QUINTIN
ST Employee

​First of all, could you tell me which version of CubeWB FW package you are using. If you are using a version higher than v1.7, you should continue upgrading the FUS with the V1.1.0 which is stm32wb5x_FUS_fw.bin at the same address 0x0807A000.

Then a few remarks.

1) I assume you board is a custom board. correct? Was is the first time you were trying to program your board.

2) In SWD mode, reading the FUS version at 0x20030030 does not work as the version is written somewhere else. So it is normal you see 0.

3) I can see that your voltage is 0. Could you check this point? I expect the voltage to be around or at t least 3V.

4) Could you download all the option bytes just to check. I expect the options nSWboot = 0, nBOOUT0 = 1 and nBOOT1 = 1. Otherwise you will have an issue after reset as the system won’t boot from the correct location (main flash memory 0x08000000). Use the command CLI.exe -c port=%comport% -ob displ

to set the option byte use the command CLI.exe -c port=swd mode=UR -ob nSWboot0=0 nboot1=1 nboot0=1

.

VDesa.1
Associate III

The cube fw package used is STM32Cube_FW_WB_V1.7.0. so i have used FUS V1.1.0.

1). Yes, The board is custom board and trying to program for first time (test firstinstall flag = 1 but still facing same issue of CM4 wait for event)

2). I can currently use SWD mode only.

3). The voltage display is 0 might be due to we use only SDWIO, SWDCLK and GND pin for custom application board, we checked HW the controller is powered properly at 3.1 V

4). I have add nSWboot0=0 nboot1=1 nboot0=1 command to check option bytes are correct.

but still facing the same issue of event not generate from CM0 on custom board.

I have tested same CM4 application code which works perfectly for P-NUCLEO-WB55 nucleo board.

Guide for same.

Remi QUINTIN
ST Employee

​Can you show me all the option bytes.

I suspect the RF stack not being active.

VDesa.1
Associate III

Here is log for option bytes.

>>STM32_Programmer_CLI.exe -c port=SWD mode=UR -ob nSWboot0=0 nboot1=1 nboot0=1

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

            STM32CubeProgrammer v2.2.1

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

ST-LINK SN : 0664FF353638425043020737

ST-LINK FW : V2J36M26

Voltage   : 0.00V

SWD freq  : 4000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID  : 0x495

Device name : STM32WBxx

Flash size : 512 KBytes

Device type : MCU

Device CPU : Cortex-M0+/M4

UPLOADING OPTION BYTES DATA ...

 Bank     : 0x00

 Address    : 0x58004020

 Size     : 104 Bytes

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

PROGRAMMING OPTION BYTES AREA ...

Warning: Option Byte: nboot0, value: 0x1, was not modified.

Warning: Option Byte: nboot1, value: 0x1, was not modified.

Warning: Option Byte: nswboot0, value: 0x0, was not modified.

Warning: Option Bytes are unchanged, Data won't be downloaded

>>STM32_Programmer_CLI.exe -c port=SWD -ob displ

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

            STM32CubeProgrammer v2.2.1

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

ST-LINK SN : 0664FF353638425043020737

ST-LINK FW : V2J36M26

Voltage   : 0.00V

SWD freq  : 4000 KHz

Connect mode: Normal

Reset mode : Software reset

Device ID  : 0x495

Device name : STM32WBxx

Flash size : 512 KBytes

Device type : MCU

Device CPU : Cortex-M0+/M4

UPLOADING OPTION BYTES DATA ...

 Bank     : 0x00

 Address    : 0x58004020

 Size     : 104 Bytes

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

OPTION BYTES BANK: 0

  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   : 0x0 (BOOT0 taken from the option bit nBOOT0)

   SRAM2RST   : 0x0 (SRAM2 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   : 0x0 (0x0)

  Security Configuration Option bytes:

   ESE     : 0x1 (Security enabled)

   SFSA     : 0x57 (0x57)

   FSD     : 0x0 (System and Flash secure)

   DDS     : 0x1 (CPU2 debug access disabled)

   C2OPT    : 0x1 (SBRV will address Flash)

   NBRSD    : 0x0 (SRAM2b is secure)

   SNBRSA    : 0xF (0xF)

   BRSD     : 0x0 (SRAM2a is secure)

   SBRSA    : 0xA (0xA)

   SBRV     : 0x15C00 (0x15C00)

  PCROP Protection:

   PCROP1A_STRT : 0x1FF (0x8000FF8)

   PCROP1A_END : 0x0 (0x8000008)

   PCROP_RDP  : 0x1 (PCROP zone is erased 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)

Remi QUINTIN
ST Employee

I don’t see anything wrong regarding the option bytes.

The fact that the code on the M4 core is running correctly on the Nucleo board make me think that the RF stack did not start on the M0+ core though I see the SBRV option byte being set properly.

Could you try using the CubeProgrammer in GUI mode and set the flag "start wireless stack"?

This would confirm the issue is on that side.  Then Idont usertand why it did not work in CLI mode.

Remi QUINTIN
ST Employee

​SFSA and SBRV option bytes are consistent. So the RF stack should be active?

There is potentially an issue with the HSE/HSI clock. Could you check that point?

Could you try to run one of our examples (for example Heart Rate) on your custom board. Load just the app on the M4 core and check whether the advertising starts.

VDesa.1
Associate III

I have tried to run BLE_HeartRate application project from cube firmware version 1.7.0 but what happen the target is disconnect after APPE_Init().

One more think i have do is install latest version of STM32 cube programmer and try to program stack but it shows image authentication error as below.0693W000004H9RkQAK.jpg

I have pick stack and FUS binaries from C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32WB5x (For windows)

Does this be the issue? Does i need authentic stack binaries from ST or something?

VDesa.1
Associate III

i have connect the target board with SWD then put OB setting to nBOOT0 = unchecked, nBOOT1 = checked and nSWBOOT0 = unchecked so that i can access target from usb interface. if we connect in USB mode then and then "start wireless stack" button present. so i do the same. but when i press the button start wireless stack then connection with target is lost, is that normal? I am still facing wait in event problem even for cube firmware version examples 1.7.0.

FUS binaries have to be those being part of the official CubeWB FW package under

STM32Cube_FW_WB_V1.8.0\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x.

You can use the v1.9 version now as it has been officially released last week.

Not that you must not update the FUS again with aversion which is already installed.

Once connected in USB DFU mode, have a look a 0x20030030 to get the FUS version. Based on the result, you will know if you have to upgrade the FUS with a newer version.