Download FreeRTOS
 

Quality RTOS & Embedded Software

KERNEL
WHAT'S NEW
Simplifying Authenticated Cloud Connectivity for Any Device.
Designing an energy efficient and cloud-connected IoT solution with CoAP.
Introducing FreeRTOS Kernel version 11.0.0:
FreeRTOS Roadmap and Code Contribution process.
OPC-UA over TSN with FreeRTOS.

Software Timers
[More about software timers...]

Resetting a software timer

It is possible to re-set a timer that has already started to run. Resetting a timer results in the timer recalculating its expiry time so the expiry time becomes relative to when the timer was reset, and not when the timer was originally started. This behaviour is demonstrated in the next diagram, where Timer 1 is a one-shot timer that has a period equal to 5 seconds.

In the depicted example, it is assumed that the application switches on an LCD back-light when a key is pressed, and that the back-light remains on until 5 seconds pass without any keys being pressed. Timer 1 is used to switch off the LCD back-light when this 5 seconds has elapsed.

The behaviour of one-shot timers and auto-reload timers
Timer behaviour when a timer is reset




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