Quality RTOS & Embedded Software

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


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


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

Latest News

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

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

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


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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