Quality RTOS & Embedded Software

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




Loading

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!


[ 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