Under what circumstances do you use free rtos

It is impossible for all tasks to be real time tasks in an application, some may hard real time task, some may be soft real time tasks and some may be non-real time tasks.

Do you use free RTOS in such situation?

If you have any tasks that have significant real-time requirements, then your system really calls for some sort of RTOS, and for embedded systems, FreeRTOS is often a good choice.

I might even your FreeRTOS in a program that doesn’t have any actual “Real-Time” requirements, as it is a good light-weight threading library for those platforms, and having used it for systems with real-time requirements makes it well known, so a good choice. It also keeps the option that if the application develops some real-time requirements, it is already designed that way.

1 Like

FreeRTOS uses the task priority to determine which tasks are more important hence having the main priority in the scheduler. This gives you full control to decide when you want to yield the main task to let the non-real time tasks to run in time critical applications.

If you are using a single loop, the low priority processes would block the time-critical ones so using an RTOS in this case I believe it to be a good choice.

1 Like

I think it makes good sense to use freeRTOS on projects because even if you don’t have time critical tasks a lot of embedded programming is event based. It will force to change your thinking from programming in a sequential sort of way ( a big friggin loop) to an event based way.