This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS: CPPI heap allocate static or dinamic

Other Parts Discussed in Thread: TMS320C6678

Tool/software: TI-RTOS

I use c6678.
Used cppiHeap dynamic allocate, but device is collapsed on init in cppi_memory_allocate in 90% of power up.
I changed it to static allocation like in User Guied:

/**********************************************************************************************/
define SIZE_CPPI_HEAP 1024 /* Should be sized large enough to fit all shared
* CPPI channel and flow objects */

/* Statically created shared heap for CPPI since IPC does create a
* shared heap for SharedRegion prior to Ipc_attach */
#pragma DATA_SECTION (cppiHeap, ".cppi_heap");
#pragma DATA_ALIGN (cppiHeap, 128)
UInt8 cppiHeap[SIZE_CPPI_HEAP];

Int32 systemInit (Void)
{
Cppi_InitCfg cppiHeapInit; /* Static CPPI heap */

...

/* Configure Cppi_init() parameters to configure static heap */
cppiHeapInit.heapParams.staticHeapBase = &cppiHeap[0];
cppiHeapInit.heapParams.staticHeapSize = SIZE_CPPI_HEAP;
cppiHeapInit.heapParams.heapAlignPow2 = 7; /* Power of 7 (128 byte) */
cppiHeapInit.heapParams.dynamicHeapBlockSize = -1; /* Shut off malloc if block runs out */
result = Cppi_initCfg (&cppiGblCfgParams, &cppiHeapInit);

/**************************************************************************************************/

Questions:
1. On which reason dynamic allocate may crashed ?
2. How to calculate the necessary cppiHeap size on static allocate.
3. What kind of allocate recommended by TI.

Thanks in advanced,
Leon.