Quality RTOS & Embedded Software

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


Scheduler behavior when only one task defined

Posted by awillson on January 22, 2016

Hello, I looked through various documents and could not find how the scheduler might work, when only one task is defined. For example, take a typical super-loop routine and make it a task, the only task, such that it runs forever and never blocks/suspends. Will the scheduler even need to run after the initial call to vTaskStartScheduler() ? How will it behave? Thanks in advance.

Scheduler behavior when only one task defined

Posted by davedoors on January 22, 2016

The scheduler behaves the same however many tasks are created. If you create only one task that never blocks and above tskIDLEPRIORITY then only your task will run. If you create it at tskIDLE priority and configUSETIMESLICING is 1 then both your task and the idle task will run. If you create it at tskIDLEPRIORITY and configUSETIMESLICING is 0 then only your task will run, but the idle task might run once first.

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

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

Latest News

Meet us at Embedded World. Hall 3A-525.

Hear from Richard Barry at Embedded World. Feb 28, 16:00, Hall 4-428.

Video: Watch James Gosling & Richard Barry at re:Invent, Las Vegas 2017.

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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