How to Disable/Enable the FreeRTOS?

Now i am using FreeRTOS for running my Tasks. I don’t know how to Disable and Enable the FreeRTOS through my code.

Thanks
Manikandan D

What exactly do you mean / want to achieve ?

Hai @hs2

Now i am using two tasks, Analog Task and Display Task with the help of FreeRTOS.

Is there any configuration in FreeRTOSConfig.h for disable the FreeRTOS. Because after disabling the FreeRTOS, i run the two tasks with the help of ISR function.
Enable means, i run the two tasks with the help of FreeRTOS like that.

Thanks
Manikandan D

Sorry - it’s still not clear to me what you want to do. You can either use FreeRTOS with tasks, semaphores, notifications etc. or not. If you want to run a basic bare metal application just with ISRs (and without any FreeRTOS API calls) just do it. There is no FreeRTOS configuration to disable it (whatever that means).

1 Like

Thanks @hs2

What is the use of vTaskSuspend, vTaskResume, vTaskSuspendAll, vTaskResumeAll

Hello Manikandan, this sentence doesn’t make any sense at all. Without FreeRTOS, no task can do anything, because a task by definition is being managed by FreeRTOS.

If what you mean is that your tasks only “kick off interrupts” and then let the ISRs do all the work - strange design, but if it works, why not. In that case all the tasks would have to do would be to suspend themselves for good. Note that if the ISRs are in need for any interaction with your tasks, the control of those interactions is the very job of FreeRTOS, so “disabling” FreeRTOS (whatever that is) would make whatever you want to do impossible.

If you need “ISR only” functionality, though, you probably wouldn’t need to use an RTOS in the first place because your main() could do all the initialization work and then enter an infinite while(TRUE){}; loop, letting the ISRs do whatever they need to do.

Regarding the suspend functions, I recommend that you read the documentation for those functions and/or the book and study the sample code to understand what they do.

1 Like

Thanks for your answer @RAc