nRF5 SDK with SoftDevice and RTOS

Hi,

I'm setting up the project(VS Code + Make + ARM-GCC) for nRF52840. The project will use nRF5 SDK(not new with Zephyr) and softdevice(both BLE roles).

Until now I've been using CMSIS RTX5 and I like it. I found few topics here on DevZone that RTX is not supported because of interrupts. So, I've been looking for "modified" FreeRTOS in nRF5 SDK v17.1.0 and I cannot find it. Where I can find FreeRTOS that will work with soft device?

The project will not use round robin scheduler, it will use co-operative where each task will switch to next task. No ciritical sections. I would be happy if I can use RTX with coop scheduler.

Thanks.

 

Parents
  • Hi Silvio,

    We stopped supporting RTX as you already mentioned that its interrupt mode was causing issues with softdevice. And also, we did not want to spend too many resources on too many RTOS solutions.

    The source code for FreeRTOS is located at nRF5_SDK_17.1.0_ddde560\external\freertos

    And you can run a BLE example running on FreeRTOS with Softdevice at nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_hrs_freertos.

    I do not want to spend too much time helping you port this SDK to RTX. Instead, please try to use the RTOS that is already supported and tested well.

Reply
  • Hi Silvio,

    We stopped supporting RTX as you already mentioned that its interrupt mode was causing issues with softdevice. And also, we did not want to spend too many resources on too many RTOS solutions.

    The source code for FreeRTOS is located at nRF5_SDK_17.1.0_ddde560\external\freertos

    And you can run a BLE example running on FreeRTOS with Softdevice at nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_hrs_freertos.

    I do not want to spend too much time helping you port this SDK to RTX. Instead, please try to use the RTOS that is already supported and tested well.

Children
  • Yes, but...

    As I see, only FreeRTOS is supported. CMSIS RTOS2 API is not supported? I have to use FreeRTOS directly?

    Found info about SD and systick here - About RTC module, Systick and SoftDevice
    Now, I cannot find info about SD and PendSV handler. Does SD use it?

  • silvio3105 said:
    As I see, only FreeRTOS is supported. CMSIS RTOS2 API is not supported? I have to use FreeRTOS directly?

    Yes we officially support FreeRTOS working on nRF52840 and have given some working examples to work with FreeRTOS + BLE.

    From the image we show that you can ofcourse use any RTOS as the softdevice is RTOS agnostic, Which means that the Softdevices and libraries architecture is not restricting your application to use any other RTOS but when we do not officially support it, it means that we stop testing them. When you find issues using other RTOS like RTX then we do not have confidence to debug as we have no done any regression testing with that solutions. 

    silvio3105 said:
    I have to use FreeRTOS directly?

    Please start with one of the examples for FreeRTOS we have shown in the SDK and try to build your application on top of that example as a template. If you want to use RTX or anyother RTOS, then you are on your own. Its doable, but we cannot assist you when you have issues with it.

    silvio3105 said:
    Now, I cannot find info about SD and PendSV handler. Does SD use it?

    Softdevice does not use PendSV and that is the reason FreeRTOS uses it.

Related