Skip to main content
SWong.10
Associate II
Dec 8, 2022 2:58 PM UTC
Question

How to configure the Bluetooth for STM32WB5MMG using STM32CubeIDE?

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

This topic has been closed for replies.

7 replies

Foued_KH
ST Employee
Dec 9, 2022 11:19 AM UTC

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
Dec 9, 2022 11:42 AM UTC

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

SWong.10
SWong.10Author
Associate II
Dec 11, 2022 9:30 AM UTC

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 

Remy ISSALYS
ST Technical Moderator
Jan 4, 2023 1:20 PM UTC

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
SWong.10Author
Associate II
Jan 31, 2023 8:39 PM UTC

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

Lotta
Associate II
Dec 12, 2022 8:19 AM UTC

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.

SWong.10
SWong.10Author
Associate II
Jan 31, 2023 8:35 PM UTC

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.