Sponsored Link

Quality RTOS & Embedded Software
About   Contact   Support   FAQ

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs Books & Kits Trace Tools Ecosystem FreeRTOS Labs Training
Sponsored Link

Last site update June 02 2015

Software Timers
[More about software timers...]

One-shot timers versus auto-reload timers

There are two types of timer, one-shot timers, and auto-reload timers. Once started, a one-shot timer will execute its callback function only once. It can be manually re-started, but will not automatically re-start itself. Conversely, once started, an auto-reload timer will automatically re-start itself after each execution of its callback function, resulting in periodic callback execution.

The difference in behaviour between a one-shot timer and an auto-reload timer is demonstrated by the timeline in the diagram below. In this diagram, Timer 1 is a one-shot timer that has a period equal to 100, and Timer 2 is an auto-reload timer that has a period equal to 200.

The behaviour of one-shot timers and auto-reload timers
The behaviour of one-shot timers and auto-reload timers

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

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2015 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.