Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

uxTaskGetStackHighWaterMark return zero

Posted by uCXpresso on December 28, 2012
Dear sir,

We try to use the freeRTOS v7.3.0, and found a problem that uxTaskGetStackHighWaterMark(...) return zero always for each task.

The problem also can be found in prvListTaskWithinSingleList(...) to show zero stack remaining.

v7.2.0 is well to check stack remaining.
Could you please to try my issue?

RE: uxTaskGetStackHighWaterMark return zero

Posted by Richard on December 28, 2012
I am pretty sure nothing has changed in that part of the code between version 7.2.0 and 7.3.0. Nonetheless I just tried the following code with both versions at got identical results:

volatile unsigned portBASE_TYPE uxHighWaterMark;

static void prvQueueSendTask( void *pvParameters )
{
portTickType xNextWakeTime;
const unsigned long ulValueToSend = 100UL;

/* FIRST CALL TO uxTaskGetStackHighWaterMark(). */
uxHighWaterMark = uxTaskGetStackHighWaterMark( NULL );

/* Initialise xNextWakeTime - this only needs to be done once. */
xNextWakeTime = xTaskGetTickCount();

for( ;; )
{
vTaskDelayUntil( &xNextWakeTime, mainQUEUE_SEND_FREQUENCY_MS );

xQueueSend( xQueue, &ulValueToSend, 0 );

/* SECOND CALL TO uxTaskGetStackHighWaterMark(). */
uxHighWaterMark = uxTaskGetStackHighWaterMark( NULL );
}
}


Regards.

RE: uxTaskGetStackHighWaterMark return zero

Posted by uCXpresso on December 28, 2012
Please see below screenshot and take by "Task Table" utility for eclipse...


All "Min Free Stack" of task become to zero.

Regards,
Jason

RE: uxTaskGetStackHighWaterMark return zero

Posted by Richard on December 28, 2012
Ok - that is a different matter to your original posting. There must be an incompatibility between the state viewer version and the FreeRTOS version. Have you tried updating the StateViewer? That comes from High Integrity Systems, not me. You should be able to update it using the standard Eclipse update mechanism.

Regards.

RE: uxTaskGetStackHighWaterMark return zero

Posted by uCXpresso on December 28, 2012
Yes, you solved my problem.

Thanks for your help.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner