Michael Rollover

Run Time stats

Discussion created by Michael Rollover on Oct 11, 2016
Latest reply on Oct 12, 2016 by Dave Marples

hi all,

I am try to Understand and use this function vTaskGetRunTimeStats (). I found the paper we aim FreeRTOS website the instruction and example Were so unclear. 

vTaskGetRunTimeStats

task.h

void vTaskGetRunTimeStats (char * pcWriteBuffer);      

See the Run Time Stats page for a full description of this feature.

configGENERATE_RUN_TIME_STATS and configUSE_STATS_FORMATTING_FUNCTIONS Both must be defined as 1 for this function to be available. The implementation must aussi Then Provide definitions for portCONFIGURE_TIMER_FOR_RUN_TIME_STATS () and portGET_RUN_TIME_COUNTER_VALUE to configure a peripheral timer / counter and return the current timer count value respectivement. The counter shoulds be at least 10 times the frequency of the tick count.

NOTE: This function will disable interrupts for ict duration. It is not Intended for use as normal runtime implementation goal debug aid.

vTaskGetRunTimeStats () calls uxTaskGetSystemState () , Then formats the raw data generated by uxTaskGetSystemState () into a human readable (ASCII) That table shows the amount of time Each task HAS spent in the Running state (how much CPU time Each task HAS Consumed) . The data is Provided Both have an absolute and a percentage value. The resolution of the absolute value is dependent on the frequency of the clock run time stats provided by the application.

vTaskGetRunTimeStats () is a utility function Provided for convenience only. It is not regarded share of the kernel. See vTaskList () for a utility function That Generates information on the state of Each task.

parameters:
pcWriteBuffer A buffer into the qui execution times will be written, in ASCII form. This buffer is assumed to be wide enough to contenir the generated report. Approximately 40 bytes per task shoulds be Sufficient.

I have no idea how to use and I am using Those LPCXPRESSO 1549. Any suggestion?

Outcomes