cancel
Showing results for 
Search instead for 
Did you mean: 

Failing to initialize BLE on a custom STM32WB55CGU6 board

Jaws404
Associate

Hello,

I’m trying to create a simple program to test BLE functionality of my board. The board does not have HSE but it has LSE. I'm not sure if that is a problem. I'm using PlatformIO for the programming, configurations and building/flashing. 

When I upload the program to board it goes to infinite loop on

 

if (!BLE.begin()) {
 while (1); 
}

 

more specific on

 

__WEAK void shci_cmd_resp_wait(uint32_t timeout)
{
  for (unsigned long start = millis(); (millis() - start) < timeout;)
  {
    if (CmdRspStatusFlag == SHCI_TL_CMD_RESP_RELEASE)   // <---- looping here
    {
      break;
    }
  }
  return;
}

 


This could be result of multiple reasons. Some things I have tested are:

1. Use STM32CubeProgrammer to flash 
stm32wb5x_FUS_fw.bin to address 0x080EC000 
stm32wb5x_BLE_HCILayer_fw.bin to address 0x080E0000
and set application code target address to 0x08000000
as per release notes

CubeProgrammer is able to read FUS infos and also start wireless stack

Jaws404_0-1740082876966.png

2. Generate linker script with STM32CubeIDE and use it
3. Optimize platformio.ini to include and exclude certain stacks
4. Configure my custom board
5. Set clock configurations in variant_SAVI.cpp
6. Set BLE specific setting in app_conf_custom.h

However it always still seems to get stuck in the same loop even I update settings or code.
I would be really grateful if someone is able to point out the problem, be it hardware or software related.

Here you can find my project files and schematic:
https://github.com/nikorainto/custom-board-STM32WB55CGU6

0 REPLIES 0