Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Updated Jun 2025

FreeRTOS 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