Hi All,
Per the documentation, uxTaskGetStackHighWaterMark is supposed to be in words: https://docs.espressif.com/projects/esp ... skHandle_t
However, this does not appear to be so. When I create a task, I am clear the task stack size is specified in bytes: https://docs.espressif.com/projects/esp ... skHandle_t
However, when I call uxTaskGetStackHighWaterMark on a task with a stack size of 8192 bytes, I am getting back values like 6036. This value only makes sense if the value it returns is in bytes. Otherwise it would mean the minimum free was ~24k, which greatly exceeds the value I specified for the task size in xTaskCreate().
Can someone clarify if the documentation is wrong on this?
Thanks!
uxTaskGetStackHighWaterMark Appears to be in Bytes
-
- Posts: 19
- Joined: Mon Mar 15, 2021 12:54 pm
Re: uxTaskGetStackHighWaterMark Appears to be in Bytes
Hi,
this is just copy/paste error.
Vanilla freertos is using dword for creating task and stack watermark. esp-idf is using bytes as base size in both functions.
this is just copy/paste error.
Vanilla freertos is using dword for creating task and stack watermark. esp-idf is using bytes as base size in both functions.
-
- Posts: 19
- Joined: Mon Mar 15, 2021 12:54 pm
Re: uxTaskGetStackHighWaterMark Appears to be in Bytes
Thanks! That is a very helpful thing to know. Hopefully there are plans to update the documentation soon!
Re: uxTaskGetStackHighWaterMark Appears to be in Bytes
Hi oklambdago,
Thanks very much for pointing this out, sorry for the confusion. It looks like a regression in the function's doxygen comment when we updated to FreeRTOS 10 (the docs for the stable ESP-IDF version has the correct description).
I've just submitted a fix for this internally.
Thanks very much for pointing this out, sorry for the confusion. It looks like a regression in the function's doxygen comment when we updated to FreeRTOS 10 (the docs for the stable ESP-IDF version has the correct description).
I've just submitted a fix for this internally.
Who is online
Users browsing this forum: No registered users and 107 guests