Totally stop FreeRTOS?

kuku2010 wrote on Wednesday, May 05, 2010:

Hi all,

I am using AVR32, EVK1100 kit

I have a need to totally kill FreeRTOS under certain operation. I tried Disable_global_interrupt() but FreeRTOS is still running, ie, another thread is still active. If I use  vTaskSuspendAll(), I can stop the other threads, but FreeRTOS is still active, I need to *TOTALLY* get rid any trace of FreeRTOS at this point.

Any suggestion? Thanks!

woops_ wrote on Wednesday, May 05, 2010:

It depends what exactly you want to do. To stop FreeRTOS you just need to kill the tick interrupt. If you want to remove FreeRTOS then call vTaskEndScheduler() if it is implemented. If it is not implemented then look at the PC port to see how to implement it.

kuku2010 wrote on Wednesday, May 05, 2010:

vTaskEndScheduler calls
xSchedulerRunning = pdFALSE;

portDISABLE_INTERRUPTS doesn’t stop the scheduler, and vPortEndScheduler( void ) is not implement in AVR32. Where do I find the info to implement it? thanks!

richard_damon wrote on Wednesday, May 05, 2010:

What do you mean by “TOTALLY” get rid of any trace, literally, that would require scrubbing memory and loading in a new program that doesn’t use FreeRTOS.

If you mean you don’t want any FreeRTOS code to execute, then you just need to not call it! Your first idea of disabling the interrupts should have done what you wanted, as long as the thread that was executing doesn’t make any calls to FreeRTOS itself, and that would be the only way for another thread to become active.

kuku2010 wrote on Wednesday, May 05, 2010:

Sorry for misleading.

In my project, in a certain operation, I’d like to execute codes that is totally independent of FreeRTOS, meaning no background schedulers at all. I thought it would be easy, simply call Disable_global_interrupt() and FreeRTOS will be out of the picture, but somehow in AVR32/FreeRTOS, that’s not the case.

richard_damon wrote on Wednesday, May 05, 2010:

If Disable_global_interrupt disables all the interrupts, then that should be sufficient. If your code does not call any FreeRTOS routines, then the only other possibility is an interrupt occurring that calls FreeRTOS code. The Scheduler can’t just decide to run on its own, it needs to be called by something. The tic interrupt calls it, other interrupts might call it, and blocking API calls may call it.

hnj16 wrote on Thursday, March 08, 2018:


I am trying to implement the same in STM32. However, I don’t think vPortEndScheduler(void) is supported. I would like to know how you were able to stop the scheduler completely if you were successful in implementing it.