Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
Hello!
I'm playing with the basic NDK example. And I decided to add a new task.
my netopenhook:
void NetOpenHook()
{
platform_write (" ok");
Error_init(&eb);
Task_Params_init(&taskParams);
taskParams.stackSize = 2048;
taskParams.priority = 4; //OS_TASKPRINORM;//OS_TASKPRINORM;
ETH_Task_hndl = Task_create((Task_FuncPtr)Task2Func , &taskParams, &eb);
if (ETH_Task_hndl == NULL) {
printf("Task create failed");
}
hHello = DaemonNew( SOCK_DGRAM, 0,12288,dtask_udp_hello,OS_TASKPRINORM,OS_TASKSTKNORM, 0, 1 );
}
my task:
void Task2Func(void)
{
printf("here is no sock or ndk");
static int ii=0;
int lichi;
int tmp1;
while(1)
{
printf("here is no sock or ndk");
xx=xx+0.01;
yy= sin(xx);
res[iter]=yy;
iter++;
if (iter==800)
iter=0;
}
}
And all works well. Daemon (server) does not interupt my task and it (task) works without interupts.
But when I'm set taskParams.priority to 1.. Server works and my PC application receive answer from server.
But server works not long. After 3-4 pollings I receive error message in console in debug mode.
Error:
ti.sysbios.heaps.HeapMem: line 294: out of memory: handle=0x138e88d8, size=4096
xdc.runtime.Error.raise: terminating execution
And I have two questions:
1. Why Server interupt task only when taskParams.priority = 1?
2. Who and how causes this error?
Thanks.