Skip to main content
AbidSulaiman
Associate II
April 23, 2019
Solved

STM32WB - STM32_WPAN (BLE) with FREERTOS

  • April 23, 2019
  • 9 replies
  • 8286 views

Hello,

I am using CubeMX 5.1 and I am aware that it is not possible to activate FREERTOS when STM32_WPAN is activated. Is there any way to integrate FREERTOS with BLE? Is the feature maybe coming out in the future?

Best answer by Christophe Arnal

Hello,

You may take as an example the BLE_HeartRate application. It is provided with both bare metal and cmsis_os (V1) interface on top of FreeRTOS.

BLE_HeartRateFreeRTOS is the FreeRTOS version whereas BLE_HeartRate is the bare metal implemetation.

Note that the FreeRTOS example does not implement low power mode. This needs to be adapted.

Regards.

9 replies

Christophe ArnalBest answer
ST Employee
April 23, 2019

Hello,

You may take as an example the BLE_HeartRate application. It is provided with both bare metal and cmsis_os (V1) interface on top of FreeRTOS.

BLE_HeartRateFreeRTOS is the FreeRTOS version whereas BLE_HeartRate is the bare metal implemetation.

Note that the FreeRTOS example does not implement low power mode. This needs to be adapted.

Regards.

AbidSulaiman
Associate II
April 23, 2019

Hello,

oh yeah. I forgot about the firmware package and just ask the question here. Thanks for the reply and explanation @Christophe Arnal​ .

Regards.

CSatz
Associate
April 25, 2019

Hello,

thanks for sharing the BLE_HeartRateFreeRTOS example with us. However, this example does not have any CubeMx configuration file with it. So coming back to the original question: Isn't it possible to use FreeRTOS together with WPAN module in CubeMX? It would be great to do the configurations in CubeMx before diving into the code. Will this be covered in the near future? Is there any reason why this is not provided yet?

Best,

Clemens

AbidSulaiman
Associate II
April 25, 2019

Hello,

true. The problem is the implementation is a bit hard to do because of no configuration can be made with CubeMX. I did try doing it myself so I got my uC working with BLE and FREERTOS now. Just I need to read more now because there is no example on the low power mode with FREERTOS.

>>Will this be covered in the near future? Is there any reason why this is not provided yet?<<

I would like to hear from ST about this too.

Regards.

Patrick Chwalek
Associate III
April 28, 2019

Is there any work currently being done on STM32CubeMX to allow for FreeRTOS and STM32_WPAN integration? I understand there is an example that merges BLE with FreeRTOS but one of the main reasons developers choose ST chips is that STM32CubeMX makes setup a bit easier than traditional methods. Its a bit of a hassle to manually port over FreeRTOS after generating a project.

ST Employee
May 2, 2019

Hello,

There are currently two features under development :

  • BLE/FreeRTOS Heart Rate with support of Stop Mode 2
  • CubeMx BLE/FreeRTOS generation support

I don't know when this will be available but the development already started. It should be available in some next release)

Regards.

SThon.1
Associate II
August 17, 2021

Hi Christophe,

has there been any progress on this topic?

Regards,

Steinar

ST Employee
August 17, 2021

Hello Steinar,

This is available in the Cube Firmware package v1.12.0.

Regards.

KKIM.6
Senior
February 3, 2023

Is there any progress on this topic?

I want to separate ADC measurement and BLE data transmission using FreeRTOS but the initial code generated from CubeMX is not understandable.

PATRICK COMBETTE
Associate III
September 7, 2021

Hello Christophe,

I posted a similar topic and also asked for the technical support.

Are we talking about the same requirement that is to run simultaneously FreeRTOS application based, and WPAN for BLE PEripheral (Server) with my own custom services definition ?

On my side, once I have read your answer, I tried tu upgrade to the v1.12.0 package but this one seems not to be compatible with my CubeMX version (which is 6.1.2). Do you confirm this point ?

When I try to upgrade CubeMX to the latest release (6.3.0) an error occurs ! See that in the enclosed capture file. Is that normal and do you know ho to do ?

Thank you in advance for your complementary informations.

Have a nice day

Regards

Patrick

PATRICK COMBETTE
Associate III
September 7, 2021

So, here am I again....

I finally succeeded in Cube MX and WB Firmware package, by performing a manual install.

So, now, I've got :

  • CubeMX v6.3.0
  • Firmware STM32WB v1.12.1

BUT this didn't solve the initial problem :

I still can't set FresRTOS simultaneously with WPAN functionnality as Server custom template and add my own services and characteristics....

Do you have more ideas on how can I do that ?

Thanks for quick help.

IKotz.1
Visitor II
September 21, 2021

Patrick...

I had the same problem, but it allowed me to select both freeRTOS and BLE after I switched my FreeRTOS settings from cmsis V1 to V2. (With V1 it did not allow both at the same time)

Ivan

PATRICK COMBETTE
Associate III
September 23, 2021

Hello,

Ok thanks for this reply, but I'm already using CMSIS v2.

In fact, only BLE Heart Rate Monitor profile can be configure with FreeRTOS.

On my side, I need to use a Server Custom template configuration, but I can't access this option in CubMX configuration.

Any other idea or indication ?

Maybe someone already successed by configuring manually ?

Thank's again for any help !

Regards

Patrick

IKotz.1
Visitor II
February 5, 2023

@KKIM.6​ Since our code is complex, we did not try to update to newest Cube. The code is not using FreeRtos, but left it with ST example Task Sequencer.

We just made our own Task(state machine) and inserted a call to it to the BLE handler loop. Our code measures Analog pressure and temperature and stores it in global variables.

When BLE client requests data, the BLE Sensor (our board) replies with the current value from the global variable.

KKIM.6
Senior
February 13, 2023

Could you share the code?

Then I can modify my code.

ICMosquera
Associate III
August 2, 2023

Plus 1 on this request.

Associate II
October 18, 2023

Just ran into this issue yesterday. 
Doesn't seem like this issue has been solved yet. 

  • Comparing BLE_HeartRate and BLE_HeartRateFreeRTOS is less helpful, because neither uses a 'Custom Template'. 
  • The issue is that 'Server Mode' does not show the 'Custom Template' option when FreeRTOS is enabled.