cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55CEUx custom board ble stack updating.

HKIM.13
Associate II

Hi, I recently designed my own pcb board for STM32WB55CEUx MCU.

Then, during working with my board I got some problem at APP_BLE_Init() function

and the symptoms are exactly same with

this

STM32WB55 BLE Stack trouble on new hardware: https://community.st.com/s/question/0D50X0000B5IOp2SQG/stm32wb55-ble-stack-trouble-on-new-hardware

and this

STM32WB : Bug in FW_WB_V1.0.0: aci_gap_set_discoverable > hci_send_req > hci_cmd_resp_wait - wait infinitely for hci_cmd_resp_release after few connection/disconnection

https://community.st.com/s/question/0D50X0000AYqZ6mSQF/stm32wb-bug-in-fwwbv100-acigapsetdiscoverable-hcisendreq-hcicmdrespwait-wait-infinitely-for-hcicmdresprelease-after-few-connectiondisconnection

So, I think I should update the ble stack inside my mcu.

But, I can only find the examples for the nucleoboard, which has USB bootloader mode.

I only have ST-link interface in my custom board.

How can I update ble stack with only stlink? or is it impossible?

Every pins of STM32WB55CEUx is available in my custom pcb board and other normal functions except ble work normally.

Any other tips for my situation is welcomed.

32 REPLIES 32
Remi QUINTIN
ST Employee

Dont give up!!

So you are now using the USB port and not the SWD port as before. So the CLI command should now use port=USB1 instead of port=SWD.

In that case it a little different as you will use the bootloader.

see the document attached and check for the USB port whether your connection + jumpers are correctly set.

You can use the CubeProgrammer tool which is an easy tool to program the WB55… and all STM32 families. You can get it on the www.st.com website.

In USB mode, you are able to read the FUS version and all the option bytes, activate the FUS , delete any FW and program your application or the RF FW quite easily.

With the Cube programmer tool, you can connect either in USB or in SWD mode.

RLour.1
Associate II

I have switched back and forth between the two ports trying to use either SWD or the bootloader (which does not appear to be there). I don't get any USB device enumeration when I use the user USB with boot0 tied high. So the SWD port is the only one that responds. Yes, I am configuring JP1 correctly for the two different modes.

Perhaps I can try the dongle that came in the Nucleo Pack

Switch to boot0, reset... blue LED lights. UART Connect on the STM32CubeProgrammer:

Verbosity at 3

 17:56:43:251 : Serial Port COM11 is successfully opened.

 17:56:43:251 : Port configuration: parity = none, baudrate = 115200, data-bit = 8,                    stop-bit = 1.0, flow-control = off

 17:56:43:251 : No Init bits value is : 0

 17:56:43:251 : Sending init command:

 17:56:43:252 : byte 0x7F sent successfully to target

 17:56:45:251 : Wait ends after 1 loop, dataready = 0, delay = 2000

 17:56:45:251 : Timeout error occured while waiting for acknowledgement.

 17:56:45:251 : No response from target received

 17:56:45:251 : byte 0x7F sent successfully to target

 17:56:45:351 : Wait ends after 1 loop, dataready = 0, delay = 100

 17:56:45:351 : Timeout error occured while waiting for acknowledgement.

 17:56:45:351 : No response from target received

 17:56:45:351 : Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...

Back to the Nucleo board...

I think the address you gave me was not correct. I believe the address is 0x080EC000 since this is the 1Meg part.

Here is the result of erasing the 6 sectors

 17:45:24:084 : Flash sector erase ...

 17:45:24:087 : Flash erase...

 17:45:24:123 : Init flashloader...

 17:45:24:124 : Loader sector erase...

 17:45:24:141 : Init flashloader...

 17:45:24:157 : Loader sector erase...

 17:45:24:157 : Init flashloader...

 17:45:24:173 : Loader sector erase...

 17:45:24:190 : Init flashloader...

 17:45:24:190 : Loader sector erase...

 17:45:24:208 : Init flashloader...

 17:45:24:208 : Loader sector erase...

 17:45:24:217 : Init flashloader...

 17:45:24:227 : Loader sector erase...

 17:45:24:238 : Existing specified sectors are erased successfully Protected sectors are not erased

Here is the log of the flash download

 17:44:36:266 : Memory Programming ...

 17:44:36:266 : Opening and parsing file: stm32wb5x_FUS_fw_1_0_2.bin

 17:44:36:268 :  File         : stm32wb5x_FUS_fw_1_0_2.bin

 17:44:36:268 :  Size         : 24492 Bytes

 17:44:36:268 :  Address      : 0x080EC000

 17:44:36:268 : Erasing memory corresponding to segment 0:

 17:44:36:271 : Memory erase...

 17:44:36:296 : Erasing internal memory sectors [236 241]

 17:44:36:296 : Init flashloader...

 17:44:36:307 : Loader sector erase...

 17:44:36:316 : Download in Progress:

 17:44:36:316 :  Size         : 24496 Bytes

 17:44:36:316 :  Address      : 0x080EC000

 17:44:36:316 : Buffer program...

 17:44:36:344 : Loader write range...

 17:44:36:432 : Init flashloader...

 17:44:36:547 : Loader write range...

 17:44:36:635 : Error: failed to download Segment[0]

 17:44:36:636 : Error: failed to download the File

These boards have been around a while, perhaps the bootloader is no longer compatible.

Remi QUINTIN
ST Employee

Indeed, it may be an old board with a very old FUS version or even with no FUS at all on it.

Moreover, the IPCCDBA option byte is set to 3 which prevents both cores to properly communicate with each other.

In addition to this, SRAM2a and SRAM2b internal memories are set as non-secure which is not the expected configuration.

So first try so set IPCCDBA = 0 and check whether you get some BLE activity.

And then check if there is a FUS on it by reading the FUS version with the Cubeprogrammer tool is USB mode.

Otherwise, I would recommend you get a more recent board.