Failing to initialize BLE.begin() on a custom STM32WB55CGU6 board

Hello,

I’m trying to create a simple program to test BLE functionality of my board. When I upload the program to board it goes to infinite loop on

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

Digging deeper and using breakpoints I’m able to verify the program reaches here but does not seem to get further

.pio\libdeps\savi\STM32duinoBLE\src\utility\HCISharedMemTransport.cpp

  /**
   * Starts the BLE Stack on CPU2
   */
  if (SHCI_C2_BLE_Init(&ble_init_cmd_packet) == SHCI_Success) {
    return 1;
  }
  return 0;

Also I’m not sure what the return value here is

My knowledge ends here and I’m asking for help what could be the problem. Using ST-LINK v2 (thumb) for uploading and debugging.

Here is the code and configs:

Cheers :slight_smile:

Actually now I found this information from readme which I will try first to proceed with

Well I flashed the firmware but nothing seems to have changed. It seems to hang forever on this call shci_cmd_resp_wait(SHCI_TL_DEFAULT_TIMEOUT);

.pio\libdeps\savi\STM32duinoBLE\src\utility\STM32_WPAN\shci_tl.c

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

I made a new branch with all the improvements proposed by GPT-4 and most changes seems to make sense but still unable to get past BLE.begin()

After I use STM32CubeProgrammer to full chip erase and then flash stm32wb5x_BLE_HCILayer_fw.bin to start address 0x08090000 FUS information looks like following but no changes to BLE functionality

EDIT:
Actually it looks like GPT was hallucinating those firmware addresses. Checking from release notes it seems below are the correct addresses. But still no progress with program execution

I was watching this Youtube tutorial and he mentioned that HSE is required to run wireless stack but my board is missing external HSE. Can someone verify is this correct and my board cannot run BLE without it?

My boards schematic