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

NRF52 running RTOS vs. SDK Scheduler

I'm trying to decide whether to use FreeRTOS or simply build on the Scheduler. What are the risks and benefits of using freeRTOS or another RTOS on a wearable sensor device vs using the scheduler?

Parents
  • I wont compare FreeRTOS with any other RTOS as that is completely different and long discussion. I will compare RTOS vs Scheduler

    priority vs scheduling

    RTOS will have scheduling of different threads based on many priorities. You can choose the scheduling scheme (on many RTOS). The scheduler in the SDK is simple, it will just queue a call from one context/priority and the call is dequeued in a different context/priority. The only scheduling happening is postponing execution from higher priority to lower priority context.

    features

    RTOS is rich with features like timers, FIFOs, messages, semaphores, mutexes etc. It is a design choice to see if you need all those as they will consume resources in terms of memory and CPU time.

    complexity

    It depends on how complex your application is. If it can handle most of the processing in the interrupts and main context, and if it is enough with the features SDK provides then it is best to keep it simple and not use any RTOS. But if the application is growing to be complex and you do not want to handle the complexity of context switches and their glitches then use RTOS which will handle threads for you. Scheduler in SDK cannot provide threads handling.

    These are few from top of my head.There could be more. We can only compare scheduling features of RTOS with SDK scheduler, other features that RTOS are not provided by SDK scheduler. It finally is your design choice, using RTOS will keep your design gives more control to the RTOS leaving most of the overhead to RTOS scheduling+ it features. Not using RTOS will have you in full control of every single context switch which you have to take into your design considerations. Some like RTOS and some like to just use SDK features, hard to say which one is best as it totally depends on the application and the use case.

Reply Children
No Data
Related