Skip to main content
PMera.1
Associate III
January 22, 2020
Question

[STM32WB55] BLE + HID?

  • January 22, 2020
  • 14 replies
  • 3818 views

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!

This topic has been closed for replies.

14 replies

Camille Louapre
Associate
April 27, 2020

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
April 28, 2020

@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
PMera.1Author
Associate III
April 28, 2020

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.

Patrick Chwalek
Associate III
June 4, 2020

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!!