This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

FreeRTOS QuickStart Guide help

Hi guys,

I use SDK14.2 (i can switch to SDK15.0 if it makes any differences) and would want to integrate FreeRTOS to my existing project. I have tried the FreeRTOS example in SDK15.0 and reed the stuff that is available on infocenter. I have also reed all FreeRTOS threads on devzone. I have so many questions and can't find answers on devzone so here it goes.

  1. What is minimal requirement to run FreeRTOS in my existing project (includes, initializations, existing issues i need to fix)
  2. How do i handle interrupts from softdevice or peripherals and what should be there interrupt priorities?
  3. How should i send data over BLE (i guess i start in a TASK but how do i handle callbacks)?
  4. Does softdevice handle its own staff in relation with FreeRTOS or is FreeRTOS the master controller and everything goes through it?

In general i do understand how FreeRTOS should work but softdevice is playing a very big role in BLE based applications and i'm not sure how they should collaborate?

Thanks

Parents
  • Hi Schef, Very good questions.

    In SDK15, we have updated FreeRTOS kernel to 10.0 and included a fix to one possible bug.

    1) You do not need to switch to SDK15 for that, just download SDK15 and extract SDK15\external\freertos folder and replace it with SDK14\external\freertos.

    The API is fully backward compatible so you do not need to change a thing. After this, you are with latest and greatest with all known issues patched. And there is no other dependency as all files are included here. I am not including standard include files and compiler specific standard libs.

    2) ISR/priorities for app using FreeRTOS, you handle it the same way as you handle without FreeRTOS, Check here

    3) Please look into the examples provided in SDK for this. You can find the example at SDK15\examples\ble_peripheral\ble_app_hrs_freertos\main.c

    4) softdevice will run at highest priority. FreeRTOS kernel runs on top of softdevice and softdevice will see freeRTOS kernel as another application. The softdevice will be given as a binary and is standalone will not depend on any RTOS.

     

     

Reply Children
Related