Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Software Timers
[More about software timers...]

See also the RTOS Deamon Task Startup Hook function.

The timer service/daemon task, and the timer command queue

Timer functionality is optional, and not part of the core FreeRTOS kernel. It is instead provided by a timer service (or daemon) task.

FreeRTOS provides a set of timer related API functions. Many of these functions use a standard FreeRTOS queue to send commands to the timer service task. The queue used for this purpose is called the 'timer command queue'. The 'timer command queue' is private to the FreeRTOS timer implementation, and cannot be accessed directly.

The diagram below demonstrates this scenario. The code on the left represents a function that is part of a user application, and called from a task that is created as part of the same user application. The code on the right represents the timer service task implementation. The timer command queue is the link between the application task and the timer service task. In this demonstrated case, the xTimerReset() API function is called from the application code. This results in a reset command being sent to the timer command queue for processing by the timer service task. The application code only calls the xTimerReset() API function - it does not (and cannot) access the timer command queue directly.

RTOS timer task and timer command queue
The context of the application code, the FreeRTOS
timer API, the timer command queue, and the timer service task.





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




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

Latest News

FreeRTOS kernel V10 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