cancel
Showing results for 
Search instead for 
Did you mean: 

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

LSpad.1
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
Remi QUINTIN
ST Employee

​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.

View solution in original post

11 REPLIES 11
Remi QUINTIN
ST Employee

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.

Remi QUINTIN
ST Employee

​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.

PATRICK COMBETTE
Associate II

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

  •  

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!

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

Remi QUINTIN
ST Employee

Last update.

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

Thank you very much Patrick for this answer, I'll need to see what will be the best approach here since I'm try to use FreeRTOS in every application I'm doing.

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

RJARC.1
Associate II

Hi,

I would be interested too if this topic is available.

Thank you.