Espressif ESP32-S2 Programming Manual page 878

Table of Contents

Advertisement

Chapter 2. API Reference
pcTaskGetHandle() to be available.
UBaseType_t
uxTaskGetStackHighWaterMark(TaskHandle_t
Returns the high water mark of the stack associated with xTask.
INCLUDE_uxTaskGetStackHighWaterMark must be set to 1 in FreeRTOSConfig.h for this function to be
available.
Returns the high water mark of the stack associated with xTask. That is, the minimum free stack space there
has been (in bytes not words, unlike vanilla FreeRTOS) since the task started. The smaller the returned number
the closer the task has come to overflowing its stack.
uxTaskGetStackHighWaterMark() and uxTaskGetStackHighWaterMark2() are the same except for their re-
turn type. Using configSTACK_DEPTH_TYPE allows the user to determine the return type. It gets around
the problem of the value overflowing on 8-bit types without breaking backward compatibility for applications
that expect an 8-bit return type.
Return The smallest amount of free stack space there has been (in bytes not words, unlike vanilla FreeRTOS)
since the task referenced by xTask was created.
Parameters
• xTask: Handle of the task associated with the stack to be checked. Set xTask to NULL to check
the stack of the calling task.
configSTACK_DEPTH_TYPE
Returns the start of the stack associated with xTask.
INCLUDE_uxTaskGetStackHighWaterMark2 must be set to 1 in FreeRTOSConfig.h for this function to be
available.
Returns the high water mark of the stack associated with xTask. That is, the minimum free stack space there
has been (in words, so on a 32 bit machine a value of 1 means 4 bytes) since the task started. The smaller the
returned number the closer the task has come to overflowing its stack.
uxTaskGetStackHighWaterMark() and uxTaskGetStackHighWaterMark2() are the same except for their re-
turn type. Using configSTACK_DEPTH_TYPE allows the user to determine the return type. It gets around
the problem of the value overflowing on 8-bit types without breaking backward compatibility for applications
that expect an 8-bit return type.
Return The smallest amount of free stack space there has been (in words, so actual spaces on the stack rather
than bytes) since the task referenced by xTask was created.
Parameters
• xTask: Handle of the task associated with the stack to be checked. Set xTask to NULL to check
the stack of the calling task.
uint8_t
*pxTaskGetStackStart(TaskHandle_t
Returns the start of the stack associated with xTask.
INCLUDE_pxTaskGetStackStart must be set to 1 in FreeRTOSConfig.h for this function to be available.
Returns the lowest stack memory address, regardless of whether the stack grows up or down.
Return A pointer to the start of the stack.
Parameters
• xTask: Handle of the task associated with the stack returned. Set xTask to NULL to return the
stack of the calling task.
void
vTaskSetApplicationTaskTag(TaskHandle_t
Sets pxHookFunction to be the task hook function used by the task xTask.
Parameters
• xTask: Handle of the task to set the hook function for Passing xTask as NULL has the effect of
setting the calling tasks hook function.
• pxHookFunction: Pointer to the hook function.
TaskHookFunction_t xTaskGetApplicationTaskTag(TaskHandle_t
Returns the pxHookFunction value assigned to the task xTask. Do not call from an interrupt service routine -
call xTaskGetApplicationTaskTagFromISR() instead.
Espressif Systems
uxTaskGetStackHighWaterMark2(TaskHandle_t
xTask)
867
Submit Document Feedback
xTask)
xTask,
TaskHookFunction_t
xTask)
xTask)
pxHookFunction)
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Table of Contents

Save PDF