FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [November 2009 Threads] vTaskDelayUntil - how to detect overload?Posted by ARMinator on November 26, 2009 Hi,
Following an advice read on this forum, I am using vTaskDelayUntil to activate a task periodically, with more control over the activation frequency.
CPUs can get overloaded, and if the task does not have the highest priority then a task waiting on vTaskDelayUntil could potentially jump (or miss) a tick.
Is there a way to asses whether or no this is happening (vTaskDelayUntil returns void)?
To implement such a periodic activation pattern, I have been using a hook on the tick announcer. A counting semaphore is then given to the tasks that need to be periodically activated. If a task sees more than one semaphore then it realizes that the CPU ran late.
I wouldn't mind using vTaskDelayUntil so that's one less piece of code I have to worry. However, I feel the need to insure that tasks know whenever they ran.
Let me know if there's a way to deduce this using the vTaskDelayUntil function.
RE: vTaskDelayUntil - how to detect overload?Posted by Richard Damon on November 26, 2009 One way to check this is to see if xTaskGetTickCount - lastTickCount (the first parm to vTaskDelayUntil) is >= tick count given to vTaskDelayUntil..
RE: vTaskDelayUntil - how to detect overload?Posted by ARMinator on November 26, 2009 Ah yes! Awesome, thanks for the heads up!
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|