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?
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.
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.