Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists