EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #882 background imageLoading...
Page #882 background image
Chapter 2. API Reference
PLEASE NOTE:
This function is provided for convenience only, and is used by many of the demo applications. Do not consider
it to be part of the scheduler.
vTaskList() calls uxTaskGetSystemState(), then formats part of the uxTaskGetSystemState() output into a
human readable table that displays task names, states and stack usage.
vTaskList() has a dependency on the sprintf() C library function that might bloat the code size, use a lot of stack,
and provide different results on different platforms. An alternative, tiny, third party, and limited functionality
implementation of sprintf() is provided in many of the FreeRTOS/Demo sub-directories in a file called printf-
stdarg.c (note printf-stdarg.c does not provide a full snprintf() implementation!).
It is recommended that production systems call uxTaskGetSystemState() directly to get access to raw stats data,
rather than indirectly through a call to vTaskList().
Parameters
pcWriteBuffer: A buffer into which the above mentioned details will be written, in ASCII form.
This buffer is assumed to be large enough to contain the generated report. Approximately 40 bytes
per task should be sufficient.
void vTaskGetRunTimeStats(char *pcWriteBuer)
Get the state of running tasks as a string
configGENERATE_RUN_TIME_STATS and configUSE_STATS_FORMATTING_FUNCTIONS must
both be defined as 1 for this function to be available. The application must also then provide definitions for port-
CONFIGURE_TIMER_FOR_RUN_TIME_STATS() and portGET_RUN_TIME_COUNTER_VALUE()
to configure a peripheral timer/counter and return the timers current count value respectively. The counter
should be at least 10 times the frequency of the tick count.
NOTE 1: This function will disable interrupts for its duration. It is not intended for normal application runtime
use but as a debug aid.
Setting configGENERATE_RUN_TIME_STATS to 1 will result in a total accumulated execution time being
stored for each task. The resolution of the accumulated time value depends on the frequency of the timer
configured by the portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() macro. Calling vTaskGetRun-
TimeStats() writes the total execution time of each task into a buffer, both as an absolute count value and as a
percentage of the total system execution time.
NOTE 2:
This function is provided for convenience only, and is used by many of the demo applications. Do not consider
it to be part of the scheduler.
vTaskGetRunTimeStats() calls uxTaskGetSystemState(), then formats part of the uxTaskGetSystemState()
output into a human readable table that displays the amount of time each task has spent in the Running state
in both absolute and percentage terms.
vTaskGetRunTimeStats() has a dependency on the sprintf() C library function that might bloat the code size,
use a lot of stack, and provide different results on different platforms. An alternative, tiny, third party, and
limited functionality implementation of sprintf() is provided in many of the FreeRTOS/Demo sub-directories
in a file called printf-stdarg.c (note printf-stdarg.c does not provide a full snprintf() implementation!).
It is recommended that production systems call uxTaskGetSystemState() directly to get access to raw stats data,
rather than indirectly through a call to vTaskGetRunTimeStats().
Parameters
pcWriteBuffer: A buffer into which the execution times will be written, in ASCII form. This
buffer is assumed to be large enough to contain the generated report. Approximately 40 bytes per
task should be sufficient.
uint32_t ulTaskGetIdleRunTimeCounter(void)
configGENERATE_RUN_TIME_STATS and configUSE_STATS_FORMATTING_FUNCTIONS must
both be defined as 1 for this function to be available. The application must also then provide definitions for port-
CONFIGURE_TIMER_FOR_RUN_TIME_STATS() and portGET_RUN_TIME_COUNTER_VALUE()
Espressif Systems 871
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish