cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure the Bluetooth for STM32WB5MMG using STM32CubeIDE?

SWong.10
Associate II

I made a breakout board using the STM32WB5MMG with SWD debugging.

I have confirmed that the SWD pins are working.

I have also set up HSEM, IPCC, RCC, RTC, RF, STM32_WPAN required but I can't detect the Bluetooth

The following are clock configuration.

0693W00000WKZGHQA5.png0693W00000WKZHAQA5.png

7 REPLIES 7
Foued_KH
ST Employee

Hello @SWong.10​ ,

You can refer to the repository : \Repository\STM32Cube_FW_WB_V1.15.0RC2\Projects\STM32WB5MM-DK\Applications\BLE

STM32CubeWB - STM32Cube MCU Package for STM32WB series (HAL, Low-Layer APIs and CMSIS, USB, File system, RTOS, BLE, Thread and Zigbee stacks - and examples running on ST boards) - STMicroelectronics

Foued

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.

Lotta
Associate II

Hi @SWong.10​ , what firmware are you using?

SWong.10
Associate II

Hi @Lotta​ ,

I follow the guidelines on :

For Firmware (V1.2.0):

stm32wb5x_FUS_fw.bin at address 0x080EC000

For Wireless (V1.15.0):

stm32wb5x_BLE_Stack_full_fw.bin at address 0x080CE000

The following shows the J-Link Commander:

0693W00000WKid5QAD.png 

Lotta
Associate II

Hi @SWong.10​ ,

I too struggled with the same issue, that is why I asked for your firmware. There seems to be a bug in the new 1.15.0 version of the firmware.

https://community.st.com/s/question/0D53W00001zO6wXSAS/bug-for-ble-init-in-new-wb5-firmware-115

I described how I debuged and what the bug is here. Maybe you can debug as well and see if it is the same problem.

If you have the same issue, the only thing that helped me was roll back to the 1.14.1 firmware. There everthing works perfectly.

Hello,

Which version of STM32CubeMX are you using? Can you share your configuration of CFG_BLE_LS_SOURCE (see app_conf.h file)?

Best Regards

SWong.10
Associate II

Hi,

Sorry for the late response due to personal reason. The problem has been solved.

STM32CubeIDE Version: V11.1.0

For Firmware (V1.2.0):

stm32wb5x_FUS_fw.bin at address 0x080EC000

For Wireless (V1.15.0):

stm32wb5x_BLE_Stack_full_fw.bin at address 0x080CE000

Follow the guidelines on :

Remember to make sure that the wireless stack is started.

The problem I faced was the clock configuration for RFWKP Clock Mux. Previously, LSE was selected but the Bluetooth did not work. Thus, using HSE instead of LSE for the RFWKP works for me.

Hi,

I am using STM32CubeIDE V11.1.0.

Is the following the correct configuration?

#if defined(STM32WB5Mxx)

 #define CFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_MOD5MM_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_HSE_1024)

#else

 #define CFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_OTHER_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_HSE_1024)

#endif

Best Regards