Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

Software Timers and suspended tasks

Posted by craigogawa on May 10, 2017

We're using FreeRTOS v8.2.2 and have a problem where our product needs to suspend none critical tasks when a power outage has been detected and resume those tasks if power comes back before a configured amount of time, e.g., up to 2 minutes. The problem we have is that when the tasks are suspended any software timers are now off by amount of time the tasks were suspended. Is there a way to "adjust" these timers prior to or when the tasks are resumed?


Software Timers and suspended tasks

Posted by rtel on May 10, 2017

Not automatically, but you could stop the timer before suspending and re-start after resuming (the timer will restart though).


Software Timers and suspended tasks

Posted by craigogawa on May 10, 2017

We use software timers in the critical (not suspended) tasks so we need the timer service running. We will look at using a hardware timer for timers that need a fixed period and will also need to detect and handle missed periods.

Thank you for your quick response.


Software Timers and suspended tasks

Posted by rtel on May 10, 2017

I wasn't suggesting stopping the timer service task, but the individual timers used by the tasks that get suspended. If the same timers are used by tasks that are not suspended then you won't be able to stop them though.


Software Timers and suspended tasks

Posted by craigogawa on May 10, 2017

We have a few tasks that already do that so we'll extend it to all of the tasks that get suspended.

Thanks again.


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS