Quality RTOS & Embedded Software

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


vTaskDelayUntil - how to detect overload?

Posted by ARMinator on November 26, 2009

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 ]    [ Privacy ]    [ Sitemap ]    [ ]

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

Latest News

FreeRTOS v10.2.0 is available for immediate download. MIT licensed, and including RISC-V and ARMv8-M (Cortex-M33) demos.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

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

Xilinx Microblaze and Zynq partner