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 Mar 2025

vTimerSetReloadMode

[Timer API]

timers.h

1 void vTimerSetReloadMode( TimerHandle_t xTimer,
2 const UBaseType_t uxAutoReload );

Updates the 'mode' of a software timer to be either an auto reload timer or a one-shot timer.

An auto reload timer resets itself each time it expires, causing the timer to expire (and therefore execute its callback) periodically.

A one shot timer does not automatically reset itself, so will only expire (and therefore execute its callback) once unless it is manually restarted.

This API function is only available if the FreeRTOS/Source/timers.c source file is included in the built project.

Parameters:

  • xTimer

    The handle of the timer to update. The handle will have been returned from the call to xTimerCreate() or xTimerCreateStatic() used to create the timer.

  • uxAutoReload

    Set

    uxAutoReload
    to
    pdTRUE
    to set the timer into auto reload mode, or
    pdFALSE
    to set the timer into one shot mode.