Skip to main content
LSpad.1
Associate III
May 6, 2020
Solved

Why RTOS is not available on STM32WB using the BLE Application Type "Client profile"?

  • May 6, 2020
  • 6 replies
  • 7642 views

Hi,

I am currently using the package version 1.6.0 on a STM32WB55.

When i configure the STM32WB55 on CubeIDE, it seems that select RTOS with CMSIS_V2 and the BLE Application Type "Server profile" configuration is possible, in fact the code is generated. Instead if i select the BLE Application Type "Client profile", the code cannot be generated anymore. Why is there this limitation? Is it possible to work-around it via code bypassing the MXCube Generator? Will it be resolved in next firmware package releases?

I have also noticed that in "Server profile" configuration, using RTOS there are a lot of Server Modes not available, but they are available using the sequencer. Will these be developed in next firmware releases?

Thank you in advance!

Lorenzo

This topic has been closed for replies.
Best answer by Remi QUINTIN

​Just to be more accurate regarding my previous statement.

it is not possible to generate a FreeRTOS code for the BLE_p2pClient project USING CUBEMX!!! But it is of course possible to port the BLE_p2pClient or the BLE_p2pserver projects or any other project under FreeRTOS but this cannot be achieve using the CubeMX tool.

Please find attached a very draft guide explaining a basic way to move from the sequencer to the FreeRTOS.

6 replies

Remi QUINTIN
ST Technical Moderator
May 6, 2020

The sequencer cannot be used with FREERTOS as FreeRTOS is using its own scheduler. Therefore, it would conflict with the sequencer, which is a very basic scheduler for bare metal implementation. This is why using the sequencer offers more possible configurations.

Only the HearRate project is selectable with the RTOS. Any p2pxx project is not ready for that. I am surprised that you could do it with the BLE_p2pServer project. Anyhow, it cannot be possible with the BLE_p2pClient project.

A porting guide that explains how to move from the sequencer to RTOS is under development. No delivery date for now.

TomC
Senior
October 9, 2023

Hi Remi,
When you say that "Only the HeartRate project is selectable with the RTOS" do you mean that the BLE functionality in the heart rate example works with freeRTOS or just that it can be selected in CubeMX? 

I just require the ability to scan for BLE beacons but otherwise my application is in FreeRTOS and doesn't use BLE.

Remi QUINTIN
Remi QUINTINBest answer
ST Technical Moderator
August 20, 2020

​Just to be more accurate regarding my previous statement.

it is not possible to generate a FreeRTOS code for the BLE_p2pClient project USING CUBEMX!!! But it is of course possible to port the BLE_p2pClient or the BLE_p2pserver projects or any other project under FreeRTOS but this cannot be achieve using the CubeMX tool.

Please find attached a very draft guide explaining a basic way to move from the sequencer to the FreeRTOS.

egoltzman
Senior
March 21, 2022

Hello,

I'm facing this issue today, two years from your reply, do you know if there is a more updated guide to do this? Any other suggestion?

Thanks!

PATRICK COMBETTE
Associate III
March 22, 2022

Hello,

As I know, there is not yet a solution from STM32CubeMX. In fact, it's just a limitation of this configuration tool, but FreeRTOS is compatible with BLE custom peripheral.

I followed the general idea of the guide Remi QUINTIN sent me, but needed a few adaptation because of some compilation errors. It works fine since few monthes.

I think the best way is to configure the project manually without STM32CubeMX. On my side, I built two application :

  • the first one, starting with CubeMX in which I added progressively all the functionalities I need, and testing at each step.
  • a second only with BLE Peripheral using custom service, with CubeMX too

Then I made a compilation of both projects, following Remi QUINTIN guide. I used a Git software (on my side it was FORK) to check and review each modification and correct them when compilation errors appeared. During this job I could see that some compatibility problems were because I started with a different version of the FW (started from V1.10.0 and then upgraded up to V1.12.1). All became OK once I updated the FW files of my project, and also the RF binary (M0 copro) with the V1.12.1.

In parallel, I suggest asking to the ST Support, I will do it, but you can also ask on your side.

Sorry not being more usefull !

Have a nice day

Patrick

PATRICK COMBETTE
Associate III
October 5, 2021

Hello ,

Regarding this topic, I have the same issue, but I couldn't success by following these recommendations.

In fact I think it's because I already made some modification undes CubeMX and this topic is not exactly for that case.

Let me explain how I did :

  • At first I have my project using USB VCP + GPIO + ANALOG + Timer which runs well
  • Then, under CubeMx, I modified it : suppress Free RTOS, add NVIC, RTC, RF and WPAN, and generated the code
  • With a Git tool (Fork), I identified the code contents that was added / suppressed ans made a manual merge of what seems to be good
  • Using your topic guide, I continued to update the code following his instructions step by step until project compilation is OK with no error.

When I load the project and excute, it hangs during RTC Init function "HAL_RTC_Init() / RTC_EnterInitMode()" call returns a Timeout Error.

Does I need to start by the BLE CubeMX configuration and add the FreeRTOS after ?

Do you have some other recommendation about how to proceed, and what step in which order ?

Thanks

Patrick

  •  

Remi QUINTIN
ST Technical Moderator
March 25, 2022

Last update.

It is still not possible to generate a BLE project with RTOS enabled at the same time directly from CubeMX.

KKIM.6
Senior
February 3, 2023

is there any progress on this topic? (BLE+FreeRTOS)

RJARC.1
Associate II
February 8, 2023

Hi,

I would be interested too if this topic is available.

Thank you.

Richard Lowe
Senior II
April 16, 2023

I'd also like to hear about an update or roadmap to implementation.