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


stack sizes again

Posted by Ben on October 29, 2007
I have searched many of the threads here looking for and answer but have not had to much luck.

I am using FreeRTOS on an lpc2368 arm7 core.

In xTaskCreate, the usStackDepth is in multiple of stack width. So for the arm7 this would be multiple of 4 bytes.

e.g usStackDepth = 100 = 100 * 4 bytes

That I understand ( i hope), although in one post I found it said that for a 32 bit stack and allocating 100 elements the size would be 32 x 100 - I assume that was in bits.

I am using vTaskList() to display task info. From the online manual -

Lists all the current tasks, along with their current state and stack usage high water mark.

Now just what is meant by the high water mark. From what I am seeing I think it is the amount of free space on the stack, because the more I allocate in xTaskCreate, the larger this value seems to get.

Also is this value in bytes or in stack widths ?

many thanks

RE: stack sizes again

Posted by Richard on October 29, 2007
The number is in bytes, not words. It is the number of bytes that have not ever been used. For example, if you stack is 100 bytes total, and the most you have ever actually used is 75 bytes, then the high water mark shown will be 25. Therefore, when this values reaches near zero, you know you have a problem!


RE: stack sizes again

Posted by Ben on October 30, 2007
ok thanks, i thought that was probably what I was seeing, but wanted to make sure as I am having some funny problems, possibly stack related.


[ 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