cancel
Showing results for 
Search instead for 
Did you mean: 

[STM32WB55] BLE + HID?

PMera.1
Associate II

When generating a new project (cubemx 5.5.0) that includes HID and BLE.

I rebuilt the sample apps provided by STM for each of these features and they work OK. However I have no clue as to how to combine the two (most probably because I'm setting the clocks wrong).

I'd appreciate any kind of assistance regarding Clock configuration (I'm transitioning from Arduino, so I'm somewhat overwhelmed by the complexity).

Thank you!

15 REPLIES 15
Stecklo
Senior

I'm still confused. What is this "last part of the transparent app" is? Do you mean tm.c file?

I expect to see ACI_GAP_SET_DISCOVERABLE() call, if application is entering advertising state. But I can't find it.

Shubham Trivedi
Associate III

I am also facing the same problem. My configuration is as given below.

FUS Version: 1.0.1
STM32CubeMX Version: 5.6.1
STM32Cube_FW_WB_Version: 1.5.0
stm32wb5x_BLE_Stack_full_fw.bin Version: 1.5.0

I configured Nucleo-WB55 board to scan the nearest beacons and send this information over USB port. USB port is configured in CDC mode. USB port will work only if LL_PWR_EnableBootC2( ) in hw_ippc.c is comments out. Otherwise USB device will not functional. I will be ready to share more information if required. Looking for solution for this problem. Thank you

Camille Louapre
Associate II

Hello,

For those who are still looking for the solution, as PMera.1 mentionned it, I found it in ble transparent mode project.

See AN5289 p.19 §4.3 Shared peripherals for more details.

Add these lines to the clock init if you use LL:

LL_HSEM_1StepLock(HSEM, 5 );
LL_RCC_HSI48_Enable();
while(!LL_RCC_HSI48_IsReady());

Or if you use HAL,

void initClk (void)
{
  RCC_OscInitTypeDef st_oscInit = {0};  
 
  /* Get mutex */
  LL_HSEM_1StepLock(HSEM, 5);
 
  st_oscInit.OscillatorType = RCC_OSCILLATORTYPE_HSI48;
  st_oscInit.HSI48State     = RCC_HSI48_ON; /* Used by USB */
  HAL_RCC_OscConfig(&st_oscInit);
}

Shubham Trivedi
Associate III

@Camille Louapre​ It worked for me. Thanks a lot for this solution. I added above mentioned 3 lines in SystemClock_Config function in main.c file.

PMera.1
Associate II

I forgot to mention, if you follow the video tutorials (a workshop) I think, the guys over at stm pretty much say that cube does not auto generate these for you. there are a couple of methods you need to manually add to the project to make it work. but other than that, it's pretty much fire and forget.

Giving this thread a bump since I encountered the same issue with Thread_FTD (v1.6) and the call to initClk as described by @Camille Louapre​ worked for me. Many thanks!!