cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 BLE Stack trouble on new hardware

Daniel L
Associate III

Hi All,

I am having trouble getting the BLE working on my new hardware. As a base project, I am using the WB55 Nucleo BLE_DataThroughput application. My new hardware is using a STM32WBCEU6.

Following the Release Notes in STM32Cube_FW_WB_V1.1.1/Projects/STM32WB_Copro_Wireless_Binaries I have created a bat script and have installed the FUS and BLE_Stack. (Batch File Attached)

The problem is when running my application code, the Ble_Hci_Gap_Gatt_Init() function does not complete as it is waiting for a CFG_IDLEEVT_HCI_CMD_EVT_RSP_ID event and does not timeout.

0690X000009YojeQAC.png

How can I verify the FUS and BLE_Stack have correctly been installed? Why am I not receiving the correct event? Have I missed something for programming a new STM32WB55 MCU?

Thanks,

Daniel

1 ACCEPTED SOLUTION

Accepted Solutions
Remi QUINTIN
ST Employee

Indeed it is a 512 KByte Flash memory device.

Looking at your log, it seems you are doing an upgrade of the RSS/FUS while it is already updated with the V1.0.2.

So this is useless.

In the second part of this log, the update process is trying to install the stack at 0x080CC000 address. BUT ... this device is a 512 Kbyte memory device. So this cannot work as this process cannot access the address range higher than 0x0807FFFF. Moreover one part of this memory is a secure area dedicated to the FUS process which is the only one with the rights to access this region. (Please look at the SFSA parameter to check the start address of this secure region).

So please try to install the stack at the address 0x08000000 + Stack size, considering also the 4K boundary.

Let me know then if it is OK.

View solution in original post

7 REPLIES 7
Remi QUINTIN
ST Employee

​Just a few points to confirm:

1) your new HW is populated with a ST32WB55CEU6 device (256KByte Flash memory)?

2) You did not get any error during the installation process?

3) The FUS was upgraded to FUS 1.0.2?

Hi Remi, Thanks for your assistance.

1) your new HW is populated with a ST32WB55CEU6 device (256KByte Flash memory)?

I have double checked that the HW is populated with the STM32WB55CEU6. According to the datasheet this MCU has 512 KB Flash Memory.

2) You did not get any error during the installation process?

On the first install I did not see any errors, unfortunately I did not save the log. Attached is a log of my second install attempt, where I do get Firmware Upgrade Errors.

3) The FUS was upgraded to FUS 1.0.2?

Yes it does look like the FUS upgraded to 1.0.2.

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

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

            STM32CubeProgrammer v2.1.0          

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

USB speed  : Full Speed (12MBit/s)

Manuf. ID  : STMicroelectronics

Product ID : DFU in FS Mode

SN     : 206436893136

FW version : 0x011a

Device ID  : 0x0495

Device name : STM32WBxx

Flash size : 512 KBytes

Device type : MCU

Device CPU : Cortex-M0+/M4

0x20030030 : 01000200

Remi QUINTIN
ST Employee

Indeed it is a 512 KByte Flash memory device.

Looking at your log, it seems you are doing an upgrade of the RSS/FUS while it is already updated with the V1.0.2.

So this is useless.

In the second part of this log, the update process is trying to install the stack at 0x080CC000 address. BUT ... this device is a 512 Kbyte memory device. So this cannot work as this process cannot access the address range higher than 0x0807FFFF. Moreover one part of this memory is a secure area dedicated to the FUS process which is the only one with the rights to access this region. (Please look at the SFSA parameter to check the start address of this secure region).

So please try to install the stack at the address 0x08000000 + Stack size, considering also the 4K boundary.

Let me know then if it is OK.

Thank you Remi you are correct the install location was wrong. I was using the location 0x080CC000 from the STM32Cube_FW_WB_V1.1.1/Projects/STM32WB_Copro_Wireless_Binaries/Release_Notes.html document, which is incorrect. It seems to assume the use of the

STM32WB5xxG and the wrong stm32wb5x_BLE_Stack_fw.bin size of 0x20000.

The following App Note states the User application should start at 0x0800 0000. I have change the install address to 0x0804E000 (reserving 0x30000 bytes) the firmware upgrade is successful, fixing the issue I originally had. If we were to update the device remotely via bluetooth would it still write the stack starting from the same memory location? If so how much memory should I reserve?

Remi QUINTIN
ST Employee

Whatever the mode used to update the FW of your device, the start address for the installation remain the same. Note that some space must be reserved ​for the update process. Considering the size of the BLE stack, at least 160Kbytes should be reserved.

But shouldnt OTA go from 0x0800 0000 to 0x0806 0000?, if i want to use ble OTA in my custom board, to be able to update apps, in order to have installed, Ble OTA, Ble OTA app and of course BLE wireless stack and RSS, how should i distribute memory regions?

Remi QUINTIN
ST Employee

BLE_OTA app must be loaded at 0x08000000 and the application expected to be uploaded via OTA should be located anywhere in Flash memory starting from 0x08007000. To save memory space for the user app, load the RF stack as close as possible from the FUS area.