Quality RTOS & Embedded Software

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




Loading

MSP430 RAM requirements

Posted by Hans M. on August 8, 2012
Hi!

First of all, I'm new to FreeRTOS and want to see if it is suitable for the device I have available. I'm using a MSP430F5529. There is only 8K RAM on this device and I would like to know how well FreeRTOS can operate with this small amount of RAM.
As an example, I would like to have 5 LEDs that are each toggled by a task. These task should be preemptive and have different priorities.
What would be the RAM overhead per task for this example? How much total RAM would be used? Is there a way to save memory by e.g. having the same memory context?

Thanks in advance!

RE: MSP430 RAM requirements

Posted by Richard on August 8, 2012
The configMINIMAL_STACK_SIZE setting in the official MSP430X port is set to either 80 words or 110 words, depending on the data model. So each task will take a minimum of 220 bytes for its stack, plus another 30 or 40 bytes for its TCB. The scheduler itself will take about 200 bytes.

Regards.

RE: MSP430 RAM requirements

Posted by Hans M. on August 9, 2012
Thanks! This helps!

RE: MSP430 RAM requirements

Posted by Mohammad on August 14, 2012
Hi Richard,
i have a question about the needed memory for the queues.

--does a queue need memory only on RAM or it needs space in the flash-memory too?
--is the needed place in RAM-memory a part of the stack of some tasks, or did a queue get a separate RAM-place, when i create it bevor the scheduler start to run.

i am using the MSP430 too.

thank you for your efforts.
Regards.

RE: MSP430 RAM requirements

Posted by Mohammad on August 14, 2012
i forget to ask this too.
i would like to ask about the needed memory for a queue too.

RE: MSP430 RAM requirements

Posted by Dave on August 14, 2012
RAM comes from the FreeRTOS heap. http://www.freertos.org/a00111.html

The amount of ROM space the queue code takes does not get more the more queues you create.

RE: MSP430 RAM requirements

Posted by Mohammad on August 14, 2012
hi davedoors,
yes i know this, about RAM and FreeRTOS heap.

my questions is: how much memory space (in RAM-which is here FreeRTOS heap) will be needed for a queue? beside the actually storage space for the queue-elements, that i can calculate manualy.

and if these memory space for queue (or semaphors) is independent from the memory stacks of the tasks.?

RE: MSP430 RAM requirements

Posted by Mohammad on August 14, 2012
and about the ROM, that means a queue will get pnly memory space from the RAM ( FreeRTOS heap ). right.?

RE: MSP430 RAM requirements

Posted by Dave on August 14, 2012
“my questions is: how much memory space (in RAM-which is here FreeRTOS heap) will be needed for a queue”


If you look in queue.c, in the function that creates the queue, you will see the queue structure being allocated, and the queue storage space being allocated. The queue structure is sizeof( struct QueueDefinition ) (or sizeof( xQUEUE) in the code, but that will only work inside queue.c). It is not allocated on a task stack. There is no way it could be allocated on a task stack, otherwise it would not exist when the function that created the queue returned.

“and about the ROM, that means a queue will get pnly memory space from the RA”


How would a queue get memory from ROM?

RE: MSP430 RAM requirements

Posted by Mohammad on August 14, 2012
thank you for your answers.

i ment that, the only memory space that is required for the queue is in the RAM and queue dont get memory space in ROM.
but your answer did already explain these too.

thank you.


[ 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