cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 Error on start of BLE stack

Lee_T
Associate II

Hi,

I'm currently trying to get Bluetooth working from Zephyr. I'm working with the Zephyr sample code
zephyr\samples\bluetooth\peripheral_dis.

I'm using a Nucleo-WB55RG board. Using STMCubeProgrammer I've loaded the FUS at 0x080EE000 and the file stm32wb5x_BLE_Stack_full_fw.bin at 0x080D0000. The chart in the release notes doesn't appear completely with any of the browsers I've tried so I may be using the wrong addresses, but it's the best I can do.

The log from STMCubeProgrammer shows:

17:25:54 : STM32CubeProgrammer API v2.19.0 | Windows-64Bits
17:26:03 : UR connection mode is defined with the HWrst reset mode
17:26:03 : ST-LINK SN : 066EFF564981774867221222
17:26:03 : ST-LINK FW : V2J39M27
17:26:03 : Board : NUCLEO-WB55RG
17:26:03 : Voltage : 3.26V
17:26:03 : SWD freq : 4000 KHz
17:26:03 : Connect mode: Normal
17:26:03 : Reset mode : Hardware reset
17:26:03 : Device ID : 0x495
17:26:03 : Revision ID : Rev X
17:26:03 : Debug in Low Power mode enabled.
17:26:03 : UPLOADING OPTION BYTES DATA ...
17:26:03 : Bank : 0x00
17:26:03 : Address : 0x58004020
17:26:03 : Size : 96 Bytes
17:26:03 : Bank : 0x01
17:26:03 : Address : 0x58004080
17:26:03 : Size : 8 Bytes
17:26:03 : UPLOADING ...
17:26:03 : Size : 4 Bytes
17:26:03 : Address : 0x58004080
17:26:03 : Read progress:
17:26:03 : Data read successfully
17:26:03 : Time elapsed during the read operation is: 00:00:00.000
17:26:03 : UPLOADING ...
17:26:03 : Size : 1024 Bytes
17:26:03 : Address : 0x8000000
17:26:03 : Read progress:
17:26:03 : Data read successfully
17:26:03 : Time elapsed during the read operation is: 00:00:00.006
17:26:46 : Old Firmware delete ...
17:26:46 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
17:26:46 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
17:26:46 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
17:26:46 : Warning: Option Bytes are unchanged, Data won't be downloaded
17:26:46 : Time elapsed during option Bytes configuration: 00:00:00.000
17:26:46 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
17:26:46 : Opening and parsing file: 0x495_FUS_Operator.bin
17:26:46 : Memory Programming ...
17:26:46 : File : 0x495_FUS_Operator.bin
17:26:46 : Size : 8.00 KB
17:26:46 : Address : 0x08000000
17:26:46 : Erasing memory corresponding to sector 0:
17:26:46 : Erasing internal memory sectors [0 1]
17:26:46 : Download in Progress:
17:26:46 : File download complete
17:26:46 : Time elapsed during download operation: 00:00:00.273
17:26:46 : Application is running, Please Hold on...
17:26:53 : Reconnecting...
17:26:53 : Reconnected !
17:26:53 : Warning: FUS_STATE_NOT_RUNNING
17:26:53 : Warning: Delete Firmware Operation Failure! STACK is Running...Switch to FUS
17:26:53 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
17:26:53 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
17:26:53 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
17:26:53 : Warning: Option Bytes are unchanged, Data won't be downloaded
17:26:53 : Time elapsed during option Bytes configuration: 00:00:00.000
17:26:53 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
17:26:53 : Opening and parsing file: 0x495_FUS_Operator.bin
17:26:53 : Memory Programming ...
17:26:53 : File : 0x495_FUS_Operator.bin
17:26:53 : Size : 8.00 KB
17:26:53 : Address : 0x08000000
17:26:53 : Erasing memory corresponding to sector 0:
17:26:53 : Erasing internal memory sectors [0 1]
17:26:53 : Download in Progress:
17:26:54 : File download complete
17:26:54 : Time elapsed during download operation: 00:00:00.250
17:26:54 : Application is running, Please Hold on...
17:26:54 : Reconnecting...
17:26:54 : Reconnected !
17:26:58 : Reconnecting...
17:26:58 : Reconnected !
17:26:59 : StartFus activated successfully
17:26:59 : FUS_STATE_IDLE
17:26:59 : Start FUS execution finished
17:26:59 : FUS is now running
17:26:59 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
17:26:59 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
17:26:59 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
17:26:59 : Warning: Option Bytes are unchanged, Data won't be downloaded
17:26:59 : Time elapsed during option Bytes configuration: 00:00:00.000
17:26:59 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
17:26:59 : Opening and parsing file: 0x495_FUS_Operator.bin
17:26:59 : Memory Programming ...
17:26:59 : File : 0x495_FUS_Operator.bin
17:26:59 : Size : 8.00 KB
17:26:59 : Address : 0x08000000
17:26:59 : Erasing memory corresponding to sector 0:
17:26:59 : Erasing internal memory sectors [0 1]
17:26:59 : Download in Progress:
17:26:59 : File download complete
17:26:59 : Time elapsed during download operation: 00:00:00.275
17:26:59 : Application is running, Please Hold on...
17:27:06 : Reconnecting...
17:27:06 : Reconnected !
17:27:06 : Warning: FUS_STATE_ERR_UNKNOWN
17:27:06 : Download Stack/FUS image at address 0x80D0000 ...
17:27:06 : Opening and parsing file: stm32wb5x_BLE_Stack_full_fw.bin
17:27:06 : Memory Programming ...
17:27:06 : File : stm32wb5x_BLE_Stack_full_fw.bin
17:27:06 : Size : 127.05 KB
17:27:06 : Address : 0x080D0000
17:27:06 : Erasing memory corresponding to sector 0:
17:27:06 : Erasing internal memory sectors [208 239]
17:27:07 : Download in Progress:
17:27:09 : File download complete
17:27:09 : Time elapsed during download operation: 00:00:02.612
17:27:09 : Verifying ...
17:27:09 : Read progress:
17:27:10 : Download verified successfully
17:27:10 : Firmware Upgrade process started ...
17:27:10 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
17:27:10 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
17:27:10 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
17:27:10 : Warning: Option Bytes are unchanged, Data won't be downloaded
17:27:10 : Time elapsed during option Bytes configuration: 00:00:00.000
17:27:10 : Succeed to set nSWboot0=0 nboot1=1 nboot0=1
17:27:10 : Opening and parsing file: 0x495_FUS_Operator.bin
17:27:10 : Memory Programming ...
17:27:10 : File : 0x495_FUS_Operator.bin
17:27:10 : Size : 8.00 KB
17:27:10 : Address : 0x08000000
17:27:10 : Erasing memory corresponding to sector 0:
17:27:10 : Erasing internal memory sectors [0 1]
17:27:10 : Download in Progress:
17:27:10 : File download complete
17:27:10 : Time elapsed during download operation: 00:00:00.254
17:27:10 : Application is running, Please Hold on...
17:27:22 : Reconnecting...
17:27:22 : Reconnected !
17:27:22 : Reconnecting...
17:27:22 : Reconnected !
17:27:22 : Firmware Upgrade Success

I then load the application using Zephyr's west. I've enabled logging in Zephyr. The serial output shows:

Booting Zephyr OS build v4.1.0-363-g895d91169e8b ***
BLE Test Code
Enable BLE
[00:00:00.008,000] <wrn> bt_hci_core: opcode 0x1003 status 0x01
Bluetooth init failed (err -5)

The error comes after the line err = bt_enable(NULL);

I'm not sure what the opcode or status is showing me, or what to do to correct this. Any suggestions are appreciated. Thanks.

Lee Thalblum

1 ACCEPTED SOLUTION

Accepted Solutions

have you clicked on the button. ’Start wireless stack’ before uploading your up. If the stack and FUS are very well working, I think you should create new thread (after selecting a best answer for the stack donwlaod issue) where you give a full description on the zephyr application you are using and how it behaves.

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.

View solution in original post

11 REPLIES 11
STTwo-32
ST Employee

Hello @Lee_T and welcome to the ST Community.

Could you please provide the bin file for the FUS that you have used together with the STM32CubeWB version. If you have downloaded the New FUS version v2.0.0, you have to be aware that:

  • Warning 1: With FUS v2.0.0, Coprocessor Binaries can be installed only through the USB interface,
    Currently CubeProgrammer versions do not support “FW_delete” command when using the ST-Link interface. The next CubeProgrammer release will address this limitation.
  • Warning 2: For Coprocessor Binaries marked as “FUS_v2 only” in the Wireless Coprocessor Binary Table below, the “start address” provided by CubeProgrammer under “Firmware upgrade services” must be corrected as follows: start_address = (start_address - 0x4000). However addresses provided in the table are correct.

If you are using the FUS V1.2 and the stm32wb5x_BLE_Stack_full_fw.bin from the STM32CubeWB V1.22.1, be aware that the stm32wb5x_BLE_Stack_full_fw.bin from the STM32CubeWB V1.22.1 is compatible only with the new FUS version 2.0.0.

If all that is working fine, try to click on the "Start Wireless Stack" button on the STM32CubeProgrammer after successfully uploading the FUS and Stack.

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.

RobK1
Associate III

Hi @STTwo-32,

 

"The next CubeProgrammer release will address this limitation."

 

Which version would that be? The Release Notes for the Wireless Binaries only state that version 2.17.0 or higher must be used. We're currently at 2.19.0 and in the Release Notes for 2.18.0 I find:

• J-Link WB stack install

 

Some clarification would be nice.

This limitation concerns the STM32CubeProgrammer V2.19.0 (the first version that does support the FUS V2.0.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.

Hi,

I'm using FS version 2.0.0.3 and STMCubeProgrammer V2.19.0.  The BLE stack gets loaded at 0x080D0000, as shown in the log below. I looked around CubeProgrammer but I didn't see anything marked "Start Wireless Stack".

13:25:02 : Old Firmware delete ...
13:25:02 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
13:25:02 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
13:25:02 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
13:25:02 : Warning: Option Bytes are unchanged, Data won't be downloaded
13:25:02 : Time elapsed during option Bytes configuration: 00:00:00.000
13:25:02 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
13:25:02 : Opening and parsing file: 0x495_FUS_Operator.bin
13:25:02 : Memory Programming ...
13:25:02 : File : 0x495_FUS_Operator.bin
13:25:02 : Size : 8.00 KB
13:25:02 : Address : 0x08000000
13:25:02 : Erasing memory corresponding to sector 0:
13:25:02 : Erasing internal memory sectors [0 1]
13:25:02 : Download in Progress:
13:25:02 : File download complete
13:25:02 : Time elapsed during download operation: 00:00:00.275
13:25:02 : Application is running, Please Hold on...
13:25:09 : Reconnecting...
13:25:09 : Reconnected !
13:25:09 : Warning: FUS_STATE_IMG_NOT_FOUND
13:25:46 : Opening and parsing file: stm32wb5x_BLE_Stack_full_fw.bin
13:25:46 : Memory Programming ...
13:25:46 : File : stm32wb5x_BLE_Stack_full_fw.bin
13:25:46 : Size : 127.05 KB
13:25:46 : Address : 0x080D0000
13:25:46 : Erasing memory corresponding to sector 0:
13:25:46 : Erasing internal memory sectors [208 239]
13:25:47 : Download in Progress:
13:25:48 : File download complete
13:25:48 : Time elapsed during download operation: 00:00:02.587

 

When I loaded and ran my app I get the following. It's slightly different than I got before, but I still don't see a solution.

*** Booting Zephyr OS build v4.1.0-363-g895d91169e8b ***
BLE Test Code
Enable BLE
ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:
438
Controller unresponsive, command opcode 0xfc0c timeout with err -11
[00:00:10.001,000] <err> os: r0/a1: 0x00000003 r1/a2: 0x00000000 r2/a3: 0x0
0000002
[00:00:10.001,000] <err> os: r3/a4: 0x00000003 r12/ip: 0x00000010 r14/lr: 0x0
80042e7
[00:00:10.001,000] <err> os: xpsr: 0x01000000
[00:00:10.001,000] <err> os: Faulting instruction address (r15/pc): 0x080042f6
[00:00:10.001,000] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
[00:00:10.001,000] <err> os: Current thread: 0x20000f90 (unknown)
[00:00:10.060,000] <err> os: Halting system

Lee

Hello @Lee_T 

please read the first warning on my first answer ‘ With FUS v2.0.0, Coprocessor Binaries can be installed only through the USB interface,
Currently CubeProgrammer versions do not support “FW_delete” command when using the ST-Link interface.´. So, you can’t install the stack throw the ST-LINK. You have to use the USB. This is a known limitation for the STM32CubeProgrammer V2.19.0.

Best Reagrds,

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.

Lee_T
Associate II

Hi STTwo-32,

The Nucleo WB55RG board I am using has an onboard STLink, which is connected via a USB connector. Is this the USB connection you are referring to? If not, what USB connection is used and what selection is made on CubeProgrammer?

In addition, I still have not found the "Start Wireless Stack" button in Programmer.

Apologies for all the questions.

Regards,

Lee

Hello @Lee_T 

To understand how to connect in USB DFU mode, please have a look at this video specially the part after 4:50. For the ‘Start Wireless Stack´, you can find it as you can see on this screenshot:

STTwo32_0-1750198555681.jpeg


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.

Hi STTwo-32,

I've tried three different browsers and none of them show a video in your reply. Did it not get posted?

Regards,

Lee

I've updated my answer with the video link attached to "this video" word.

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.