2025-06-15 4:40 PM
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
Solved! Go to Solution.
2025-06-23 11:55 AM
Hi STTwo-32,
I wartched the video and upgraded both the FUS and BLE stack. The stack was upgraded using USB. The following log seems to show both the FUS and BLE stack upgrades were successful, but I still get the message shown on the bottom trace.
CubeProg log:
14:24:51 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
14:24:51 : Opening and parsing file: 0x495_FUS_Operator.bin
14:24:51 : Memory Programming ...
14:24:51 : File : 0x495_FUS_Operator.bin
14:24:51 : Size : 8.00 KB
14:24:51 : Address : 0x08000000
14:24:51 : Erasing memory corresponding to sector 0:
14:24:51 : Erasing internal memory sectors [0 1]
14:24:51 : Download in Progress:
14:24:51 : File download complete
14:24:51 : Time elapsed during download operation: 00:00:00.270
14:24:51 : Application is running, Please Hold on...
14:24:51 : Reconnecting...
14:24:51 : Reconnected !
14:24:52 : FUS_STATE_IDLE
14:24:52 : Read FUS state command execution finished
14:24:52 : UPLOADING ...
14:24:52 : Size : 4 Bytes
14:24:52 : Address : 0x20010010
14:24:52 : Read progress:
14:24:52 : Data read successfully
14:24:52 : Time elapsed during the read operation is: 00:00:00.000
14:24:52 : UPLOADING ...
14:24:52 : Size : 4 Bytes
14:24:52 : Address : 0x20010014
14:24:52 : Read progress:
14:24:52 : Data read successfully
14:24:52 : Time elapsed during the read operation is: 00:00:00.000
14:24:52 : UPLOADING ...
14:24:52 : Size : 4 Bytes
14:24:52 : Address : 0x8001FFC
14:24:52 : Read progress:
14:24:52 : Data read successfully
14:24:52 : Time elapsed during the read operation is: 00:00:00.000
14:25:37 : Option byte command : -ob nBOOT0=0
14:25:37 : PROGRAMMING OPTION BYTES AREA ...
14:25:37 : Bank : 0x00
14:25:37 : Address : 0x58004020
14:25:37 : Size : 96 Bytes
14:25:37 : Reconnecting...
14:25:42 : Reconnected !
14:25:42 : UPLOADING OPTION BYTES DATA ...
14:25:42 : Bank : 0x00
14:25:42 : Address : 0x58004020
14:25:42 : Size : 96 Bytes
14:25:42 : Bank : 0x01
14:25:42 : Address : 0x58004080
14:25:42 : Size : 8 Bytes
14:25:42 : OPTION BYTE PROGRAMMING VERIFICATION:
14:25:42 : Option Bytes successfully programmed
14:25:42 : Time elapsed during option Bytes configuration: 00:00:05.493
14:25:52 : Disconnected from device.
14:26:00 : UR connection mode is defined with the HWrst reset mode
14:26:03 : Error: Invalid USB port name !
14:26:03 : Error: Establishing connection with the device failed
14:26:11 : UR connection mode is defined with the HWrst reset mode
14:26:12 : Error: Invalid USB port name !
14:26:12 : Error: Establishing connection with the device failed
14:26:37 : UR connection mode is defined with the HWrst reset mode
14:26:37 : USB speed : Full Speed (12MBit/s)
14:26:37 : Manuf. ID : STMicroelectronics
14:26:37 : Product ID : DFU in FS Mode
14:26:37 : SN : 204B31683831
14:26:37 : DFU protocol: 1.1
14:26:37 : Board : --
14:26:37 : Device ID : 0x0495
14:26:37 : UPLOADING OPTION BYTES DATA ...
14:26:37 : Bank : 0x00
14:26:37 : Address : 0x1fff8000
14:26:37 : Size : 128 Bytes
14:26:37 : UPLOADING ...
14:26:37 : Size : 4 Bytes
14:26:37 : Address : 0x1FFF8070
14:26:37 : Read progress:
14:26:37 : Data read successfully
14:26:37 : Time elapsed during the read operation is: 00:00:00.002
14:26:37 : UPLOADING ...
14:26:37 : Size : 1024 Bytes
14:26:37 : Address : 0x8000000
14:26:37 : Read progress:
14:26:37 : Data read successfully
14:26:37 : Time elapsed during the read operation is: 00:00:00.003
14:27:25 : FUS state is FUS_IDLE
14:27:25 : FUS status is FUS_NO_ERROR
14:27:28 : Old Firmware delete ...
14:27:28 : Deleting firmware ...
14:27:28 : Firmware delete finished
14:27:28 : FUS state is FUS_ERROR
14:27:28 : FUS status is FUS_IMAGE_NOT_FOUND
14:27:31 : FUS state is FUS_IDLE
14:27:31 : FUS status is FUS_NO_ERROR
14:27:33 : Download Stack/FUS image at address 0x80D0000 ...
14:27:33 : Opening and parsing file: stm32wb5x_BLE_Stack_full_fw.bin
14:27:33 : Memory Programming ...
14:27:33 : File : stm32wb5x_BLE_Stack_full_fw.bin
14:27:33 : Size : 127.05 KB
14:27:33 : Address : 0x080D0000
14:27:33 : Erasing memory corresponding to sector 0:
14:27:33 : Erasing internal memory sectors [208 239]
14:27:34 : Download in Progress:
14:27:36 : File download complete
14:27:36 : Time elapsed during download operation: 00:00:02.455
14:27:36 : FUS state is FUS_IDLE
14:27:36 : FUS status is FUS_NO_ERROR
14:27:38 : Firmware Upgrade process started ...
14:27:38 : Updating firmware ...
14:27:38 : Waiting for firmware upgrade end
14:27:44 : FUS state is WIRELESS_STACK_UPGRADE_ONGOING
14:27:44 : FUS status is FUS_NO_ERROR
14:27:46 : FUS state is FUS_ERROR
14:27:46 : FUS status is FUS_NOT_RUNNING
14:27:46 : Firmware Upgrade Success
14:27:58 : Disconnected from device.
Zephyr log output:
*** 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)
Any ideas? Thanks.
Regards,
Lee
2025-06-23 12:04 PM
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.