Quality RTOS & Embedded Software

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




Loading

uxTaskGetStackHighWaterMark returns an randomly oscillating value

Posted by tomasvalno on June 26, 2017

Hi all, I've using freertos for a while now and specially the uxTaskGetStackHighWaterMark to empirically scale the stack for my tasks. My problem now is that when I call this function for one of my active tasks, it does not return a fixed or decreasing value( as it's supposed to be) but instead it increases and decreases randomly each time i call this function. I tried to call uxTaskGetStackHighWaterMark within the task, outside of it and from a software timer, but in all cases presents the same behavior. In the task there is never an overflow, nor is it suspended or deleted and re-created. It is simply a task waiting for a semaphore to be executed, which is freed on an interrupt of an ADC. Also, I've checked that the variable I use to store and log this stack usage is not accessed by in other point of the code, no even by some incorrectly used pointer. This behavior doesn't not cause ( apparently ) any trouble with the normal execution of the application, but I need to be sure that it's not cause by a hidden bug tat causes my application to crash in the future.

Regards, Tomas


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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