Skip to main content
CKnez.1
Associate
June 4, 2021
Question

How to use BLE on STM32WB5MMG with CubeMX

  • June 4, 2021
  • 0 replies
  • 565 views

Hi community,

I designed my own PCB and implemented the STM32WB5MMG.

The device is a rather simple "Smart Home Outlet" that you can turn on/off with a Smartphone via BLE (it is just a fun project to learn some BLE).

I verified that everything is working by disabling BLE and just uploading some simple FreeRTOS based code using CubeIDE.

Now i want to turn on BLE. I configured everyting in CubeIDE/CubeMX:

RTC, HSEM, WPAN..., no FreeRTOS

I followed some examples from CubeIDE and noticed already that I have to hand over to the start the scheduler with the following.

while(1) {
 UTIL_SEQ_Run( UTIL_SEQ_DEFAULT );
}

Then I ran into the problem that the code got stuck really shortly after being started. The device does not start CPU2 properly i think.

After following some more code I found that by using:

 LL_HSEM_1StepLock( HSEM, 5 );

the device does not get stuck.

UTIL_SEQ_RegTask(...)

I can add my own task and let the onboard LED blink.

But I can not figure out how to start BLE.

Does anyone have an idea what I am doing wrong ?

Thanks in advance !!!

This topic has been closed for replies.