@@ -1934,20 +1934,55 @@ void vTaskList( char * pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unquali
19341934 */
19351935void vTaskGetRunTimeStats ( char * pcWriteBuffer ) PRIVILEGED_FUNCTION ; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
19361936
1937+ /**
1938+ * task. h
1939+ * @code{c}
1940+ * configRUN_TIME_COUNTER_TYPE ulTaskGetRunTimeCounter( const TaskHandle_t xTask );
1941+ * configRUN_TIME_COUNTER_TYPE ulTaskGetRunTimePercent( const TaskHandle_t xTask );
1942+ * @endcode
1943+ *
1944+ * configGENERATE_RUN_TIME_STATS must be defined as 1 for these functions to be
1945+ * available. The application must also then provide definitions for
1946+ * portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() and
1947+ * portGET_RUN_TIME_COUNTER_VALUE() to configure a peripheral timer/counter and
1948+ * return the timers current count value respectively. The counter should be
1949+ * at least 10 times the frequency of the tick count.
1950+ *
1951+ * Setting configGENERATE_RUN_TIME_STATS to 1 will result in a total
1952+ * accumulated execution time being stored for each task. The resolution
1953+ * of the accumulated time value depends on the frequency of the timer
1954+ * configured by the portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() macro.
1955+ * While uxTaskGetSystemState() and vTaskGetRunTimeStats() writes the total
1956+ * execution time of each task into a buffer, ulTaskGetRunTimeCounter()
1957+ * returns the total execution time of just one task and
1958+ * ulTaskGetRunTimePercent() returns the percentage of the CPU time used by
1959+ * just one task.
1960+ *
1961+ * @return The total run time of the given task or the percentage of the total
1962+ * run time consumed by the given task. This is the amount of time the task
1963+ * has actually been executing. The unit of time is dependent on the frequency
1964+ * configured using the portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() and
1965+ * portGET_RUN_TIME_COUNTER_VALUE() macros.
1966+ *
1967+ * \defgroup ulTaskGetRunTimeCounter ulTaskGetRunTimeCounter
1968+ * \ingroup TaskUtils
1969+ */
1970+ configRUN_TIME_COUNTER_TYPE ulTaskGetRunTimeCounter ( const TaskHandle_t xTask ) PRIVILEGED_FUNCTION ;
1971+ configRUN_TIME_COUNTER_TYPE ulTaskGetRunTimePercent ( const TaskHandle_t xTask ) PRIVILEGED_FUNCTION ;
1972+
19371973/**
19381974 * task. h
19391975 * @code{c}
19401976 * configRUN_TIME_COUNTER_TYPE ulTaskGetIdleRunTimeCounter( void );
19411977 * configRUN_TIME_COUNTER_TYPE ulTaskGetIdleRunTimePercent( void );
19421978 * @endcode
19431979 *
1944- * configGENERATE_RUN_TIME_STATS, configUSE_STATS_FORMATTING_FUNCTIONS and
1945- * INCLUDE_xTaskGetIdleTaskHandle must all be defined as 1 for these functions
1946- * to be available. The application must also then provide definitions for
1947- * portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() and portGET_RUN_TIME_COUNTER_VALUE()
1948- * to configure a peripheral timer/counter and return the timers current count
1949- * value respectively. The counter should be at least 10 times the frequency of
1950- * the tick count.
1980+ * configGENERATE_RUN_TIME_STATS must be defined as 1 for these functions to be
1981+ * available. The application must also then provide definitions for
1982+ * portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() and
1983+ * portGET_RUN_TIME_COUNTER_VALUE() to configure a peripheral timer/counter and
1984+ * return the timers current count value respectively. The counter should be
1985+ * at least 10 times the frequency of the tick count.
19511986 *
19521987 * Setting configGENERATE_RUN_TIME_STATS to 1 will result in a total
19531988 * accumulated execution time being stored for each task. The resolution
0 commit comments