Quality RTOS & Embedded Software

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


Loading

Setting up context for the scheduler

Posted by Joseph Dupre on July 8, 2010
I use timers and interrupts prior to calling vTaskStartScheduler() as part of a startup routine. Aside from calling portDISABLE_INTERRUPTS(), is there any other cleanup required to define the proper context before starting the scheduler???

RE: Setting up context for the scheduler

Posted by Dave on July 14, 2010
I'm not sure exactly what the question is, but as long as you don't try doing a context switch before the scheduler has started you should be ok. Normally interrupts will get disabled by calling an API function if the scheduler is not started in any case.

RE: Setting up context for the scheduler

Posted by Joseph Dupre on July 14, 2010
I'm just asking what the required state be when starting the scheduler for the first time. As far as I know (for an ARM), it's just:
1) interrupts disabled.
2) in supervisor mode.

RE: Setting up context for the scheduler

Posted by Dave on July 14, 2010
“1) interrupts disabled.
2) in supervisor mode.”


That is correct. FreeRTOS will disable interrupts temporarily while the scheduler is being started in any case. Interrupts will be enabled when the first task actually starts executing (by default in any case).


[ 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.


Careers

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

Renesas

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