cancel
Showing results for 
Search instead for 
Did you mean: 

Need help related freeRTOS timing mechanism implementation, on BLE P2P Server project, running on STM32WB, instead of existing UTIL_SEQ_Run(~0) timing mechanism

Micha Valach
Associate III

Hello,

I made several modifications to the STM32WB HandsOn_3 example (based on p2p-server project located at c:\STM32WB_workshop\HandsOns\HansdsOn_3) and succeeded to communicate with my mobile application - all OK =)

However the above working solution is based on Sequencer (UTIL_SEQ_Run(~0) ) scheduling mechanism. As my entire project is based on freeRTOS, I'd like to find the best approach on how to convert the working Sequencer mechanism into freeRTOS Mechanism? (for P2P server project)

P.S

  1. I tried to modified the above working HandsOn_3 project, in CubeMX 5.4 by unchecked the Sequencer utility, and checked the freeRTOS however:
  • CubeMX auto code generator implements the HRS one way comm vs. P2P Server two way comm.
  • while debug this code in CubeIDE (1.1.0) the FW got stuck in endless loop

2. I checked the example located at:  ..\Repository\STM32Cube_FW_WB_V1.3.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_HeartRateFreeRTOS

This example works OK, however:

  • It is again one way comm. only HRS
  • It is based on freeRTOS but the code was generated manually, without CubeMX project file

I need help, to decide which approach will be the best starting point, before FW modification either PS#1 or PS#2 ?

Thanks In Advance,

Micha

2 REPLIES 2
Christophe Arnal
ST Employee

Hello,

CubeMx does not convert the example running on FreeRTOS to the Sequencer.

There is "almost" a one to one mapping between the Sequencer and cmsis_os api.

The easiest way is to check the differences between BLE_HeartRateFreeRTOS and BLE_HeartRate. This will provide good hints to move the Sequencer to FreeRTOS ( cmsis_os). There should be no other differences than the one required to switch between the Sequencer and FreeRTOS.

Regards

Micha Valach
Associate III

Hi Christophe,

Thanks for your reply

I already did what you suggested, and yes I have some clues

However seems that at some point in the near future, ST will supply CubeMX + BLE + freeRTOS example, from what I have seen, there are some differences between cmcis_os API vs. the latest freeRTOS that generated by CubeMX

Seems need to wait a bit and to get complete example CubeMX + BLE + freeRTOS which supports also low power, etc

Best Regards,

Micha