Quality RTOS & Embedded Software

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




Loading

task utilization

Posted by lafleur on January 15, 2008
Is there a function that one can call to determine the approximate % utilization of the target processor and application in FreeRTOS??

if not this would be a great debug tool to add in the future...


thanks..

RE: task utilization

Posted by woops_ on January 15, 2008
Not directly but there are possibilities.

Use an idle hook to toggle a pin continuously. Then you can see on a scope the amount of time the idle task is running.

Use a tick hook to see if the current task is the idle task and keep a count of the frequence.

Use an idle hook to perform some other form of measurement.

RE: task utilization

Posted by David Hawks on January 16, 2008
If you are fortunate enough to have a spare DAC on board, you can send the current task number to the DAC on a context switch. Not only do you get % utilization, but you also get a very handy real time execution graph on your scope. Granted this increases the length of a context switch (by ten instructions for me), the visibility you gain into your system usually makes it worth the cost.

P.S. I modify the "tskTCB" structure so that "uxTCBNumber" is directly after "pxTopOfStack". That way my context switch code can easily grab the task number after reading the stack pointer.


[ 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