cancel
Showing results for 
Search instead for 
Did you mean: 

STEVAL-Proteus (STM32WB55MMG): Custom BLE application

ALABR.1
ST Employee

Hello,

I am trying to design a BLE custom template application. I start by following the STM32WB Bluetooth® LE - STM32CubeMX Application Conception (https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32WB_BLE_STM32CubeMX) using the P-NUCLEO-WB55 board and it work well: I managed to create my own services with CubeMX, connect to the P-NUCLEO board, and read/write to my characteristics.

I decided to follow the same steps in the same way to port my BLE application to the STEVAL Proteus board. Unfortunately it doesn't work at all : I can't see the board using St-BLE-ToolBox from my phone.

The application seem to start correctly with no error. I only have this lines of debug :

 [app_entry.c][APPE_SysUserEvtRx][362] Wireless Firmware version 1.14.1

 [app_entry.c][APPE_SysUserEvtRx][363] Wireless Firmware build 1

 [app_entry.c][APPE_SysUserEvtRx][364] FUS version 1.2.0

 [app_entry.c][APPE_SysUserEvtRx][366] >>== SHCI_SUB_EVT_CODE_READY

 [app_entry.c][APPE_SysEvtReadyProcessing][452] >>== WIRELESS_FW_RUNNING 

 [app_entry.c][APPE_SysEvtReadyProcessing][476] >>== DBGMCU_GetRevisionID= 2001 

 [app_entry.c][APPE_SysEvtReadyProcessing][481] >>== DBGMCU_GetDeviceID= 495 

I then use a user button on the board to change a value and notify my phone. As soon as I press the button, the callback call the sequencer to start my task but the MCU go to HardFault.

My FUS infos are :

0693W00000aHPSSQA4.png 

And my clock tree:

0693W00000aHPT6QAO.pngI also try to follow the step describe in the STM32WB_Getting_Started_with_CubeMX_for_BLE_V07 PowerPoint that I attached but no luck as well.

UPDATE#1 22/022/2023:

My code get stuck in the APP_BLE_Init() {app_ble.c} waiting for CPU2(Cortex-M0+) to start the BLE stack :

/**
   * Starts the BLE Stack on CPU2
   */
  status = SHCI_C2_BLE_Init(&ble_init_cmd_packet);   /* Waiting for ever here */
  if (status != SHCI_Success)
  {
    APP_DBG_MSG("  Fail   : SHCI_C2_BLE_Init command, result: 0x%02x\n\r", status);
    /* if you are here, maybe CPU2 doesn't contain STM32WB_Copro_Wireless_Binaries, see Release_Notes.html */
    Error_Handler();
  }
  else
  {
    APP_DBG_MSG("  Success: SHCI_C2_BLE_Init command\n\r");
  }

I will appreciate any help or advise,

Many Thanks,

Axel.

1 ACCEPTED SOLUTION

Accepted Solutions
ALABR.1
ST Employee

I found out that no BLE Stack was running on CPU2 (Cotex-M0+).

I solve this issue by:

Step1: updating the BLE STACK to the last version (STM32Cube_FW_WB_V1.15.0\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x\stm32wb5x_BLE_Stack_full_fw.bin) at the corresponding address (check the release note according top your exact STM32WB55xx).

Step2: Start the Wireless Stack (I use STM32CubProgrammer to achieve this).

After that everything's work flawless.

Hope this will help,

Regards,

Axel.

Note: AN5185 was very usefull (https://www.st.com/resource/en/application_note/dm00513965-st-firmware-upgrade-services-for-stm32wb-series-stmicroelectronics.pdf)

View solution in original post

1 REPLY 1
ALABR.1
ST Employee

I found out that no BLE Stack was running on CPU2 (Cotex-M0+).

I solve this issue by:

Step1: updating the BLE STACK to the last version (STM32Cube_FW_WB_V1.15.0\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x\stm32wb5x_BLE_Stack_full_fw.bin) at the corresponding address (check the release note according top your exact STM32WB55xx).

Step2: Start the Wireless Stack (I use STM32CubProgrammer to achieve this).

After that everything's work flawless.

Hope this will help,

Regards,

Axel.

Note: AN5185 was very usefull (https://www.st.com/resource/en/application_note/dm00513965-st-firmware-upgrade-services-for-stm32wb-series-stmicroelectronics.pdf)