Download FreeRTOS
 

Quality RTOS & Embedded Software

KERNEL
WHAT'S NEW
FreeRTOS website now available in Simplified Chinese
New FreeRTOS Long Term Support version now available.
FreeRTOS Extended Maintenance Program (EMP) registration now open.
FreeRTOS-Plus-TCP v3.0.0 released:
Featured FreeRTOS IoT Integrations:

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





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