FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [December 2012 Threads] uxTaskGetStackHighWaterMark return zeroPosted 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 zeroPosted 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 zeroPosted 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 zeroPosted 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 zeroPosted by uCXpresso on December 28, 2012 Yes, you solved my problem.
Thanks for your help.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|