cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX - Programming an BLE LP device (WB07CC)

Emueller
Associate

With the introduction of the new STM32WB07 MCUs in the STM32CubeMX software, the BLEMGR Middleware has also been added. Within this Middleware, it is supposed to be possible to programm BLE Low Power (LP) devices.

However, there is a lack of documentation and examples on how to work with the code generated by CubeMX for programming LP devices. While I have worked with previous LP devices using examples (e.g., from the STM32WB Navigator App and the specific examples for the STM32WB07CC evaluation board), the situation is different with the CubeMX-generated projects.

 

 

In past examples, the initialization process involved calling a BLE_STACK_Init() function, which initializes the BLE stack as well as initalizing other components such as the PKA, AES, and NVM Manage. Unfortunately, these functions,  are missing when generating code through CubeMX for the WB07CC.

I attempted to initialize the BLE stack using the available functions, but consistently encountered a timeout error.

It would be highly beneficial to have some guidance or examples that demonstrate how to properly utilize the CubeMX-generated code for an LP device, particularly when programming the STM32WB07CC chip directly (without an external controller). It’s worth noting that when creating a project in CubeMX, the use of an intermediary controller seems non-optional, which adds to the challenge.

Any detailed examples or best practices for configuring and initializing the BLE stack for the WB07CC using CubeMX would be greatly appreciated.

 

3 REPLIES 3
STTwo-32
ST Employee

Hello @Emueller and welcome to the ST Community

For the STM32WB07CC, you may want to take a look at the Cube package STM32WB0 BLE examples for the NUCLEO-WB07CC. Some of those examples are based on a .ioc file (such as the P2P Client, server, Router or other examples). So, it should be a good guide on how to use the STM32WB07 for a BLE application.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Emueller
Associate

Thank you for your response.

I had already reviewed those examples; however, if I were to use them, how should the code generated by CubeMX be integrated? I would prefer to utilize the CubeMX-generated code, as it is more structured and easier to understand.

Additionally, I do not understand why the structure of the generated code differs so significantly from the Board example code. When I generate code for this specific board using CubeMX and incorporate the BLE-LP core from the X-CUBE-BLEMGR middleware, the result appears entirely different, also it does not work as described in my first post.

Best Regards,

Emueller

Hello @Emueller 

When generating a project for an STM32WB07, you don't need to add any external package (such as the X-CUBE-BLEMGR) to enable the BLE capability. You just have to use the STM32CubeWB0 configurations more helpful details are available on the AN5977 specially the chapter 5.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.