Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Totally stop FreeRTOS?

Posted by kuku2010 on May 5, 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!

RE: Totally stop FreeRTOS?

Posted by woops_ on May 5, 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.

RE: Totally stop FreeRTOS?

Posted by kuku2010 on May 5, 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!

RE: Totally stop FreeRTOS?

Posted by Richard Damon on May 5, 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.

RE: Totally stop FreeRTOS?

Posted by kuku2010 on May 5, 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.

RE: Totally stop FreeRTOS?

Posted by Richard Damon on May 5, 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.

Totally stop FreeRTOS?

Posted by hnj16 on March 8, 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.

Thanks, Harsha

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers


STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner