cancel
Showing results for 
Search instead for 
Did you mean: 

What is the correct CSTACK and HEAP for STM32F303cc ?

Davy Jones
Associate II
Posted on February 05, 2018 at 11:28

Our embedded application keep crashing

VListinsertend

after some time of operations. FreeRTOS code is generated using CubeMx.   What could be the possible issue ? 

FreeRTOS details

 

FreeRTOS 8.2 with heap 4 , Systick timer

osThreadDef(Task1, StartTask1, osPriorityRealtime, 0, 256);

osThreadDef(Task2, StartTask2, osPriorityHigh, 0, 196);

osThreadDef(Task3,StartTask3, osPriorityRealtime, 0, 256);

osThreadDef(Task4, StartTask4, osPriorityAboveNormal, 0, 196);

http://www.st.com/en/microcontrollers/stm32f303cc.html

256 Kbytes of Flash memory

40 Kbytes of SRAM

What should be the ideal CSTACK and HEAP size for the this kind of applications ?

Custom size cstack and Heap

0690X00000609bPQAQ.png

Can anyone guide us in the right direction on how to find the right size of CSTACK and HEAP for the application ?  

#stm32f3 #freertos #stack #heap
1 REPLY 1
Posted on February 05, 2018 at 15:27

The STACK in this context is probably just what's need to start all the other tasks, and those allocate theirs from the HEAP.

>>

Can anyone guide us in the right direction on how to find the right size

..

You, as a developer, need some conception of what demands your code generates, the call depth of your routines, the auto/local variable usages, and the expectations for malloc/free dynamic allocation of resources.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..