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.