Dear All I have created 3 tasks,
this is task one it has a osPriorityBelowNormal
for(;;) { main_TcpNet (); }
This is task 2 it has a osPriorityHigh
for(;;) { /* Timer tick every 100 ms */ timer_tick (); osDelay(100); }
this is the task 3 it has osPriorityNormal
U8 Rem_IP[4] = {192,168,0,1};//The PC IP uint8_t *sendbuf; tcp_soc = tcp_get_socket (TCP_TYPE_CLIENT_SERVER | TCP_TYPE_KEEP_ALIVE, 0, 30, tcp_callback); tcp_listen (tcp_soc, 1943); for(;;) { osDelay(1000); switch (tcp_get_state (tcp_soc);) { case TCP_STATE_FREE: case TCP_STATE_CLOSED: case TCP_STATE_LISTEN: tcp_connect (tcp_soc, Rem_IP, 2121, 0); break; case TCP_STATE_CONNECT: if (tcp_check_send (tcp_soc) == __TRUE) { sendbuf = tcp_get_buf(1460); //Fill buffer in here tcp_send (tcp_soc, sendbuf, 1460); } break; } }
But when the application runs for some time it will crash and it would tell that /* Locked Memory management function (alloc/free) re-entered. */ /* RTX multithread protection malfunctioning, not implemented */ /* or interrupt disable is not functioning correctly. */
What's wrong? do you have any idea?
Thanks for the info,