Quality RTOS & Embedded Software

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


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


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) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists