In my development,I have 15 number of TASK, one is Ethernet_task that comm. with single PC (PC is Server- TWRk60d100m is client). i already set RTCS Setting as you suggest before calling RTCS_create() . Up to some extend of RAM memory, This work fine ,but when i take new variable,other task work Fine except Ethernet , below some limit of RAM consume all is well..why this happened???
my Code of Ethernet_Task As....
......
..
_RTCSPCB_init = 4;
_RTCSPCB_grow = 2;
_RTCSPCB_max = 20;//4
_RTCS_msgpool_init = 4;
_RTCS_msgpool_grow = 2;
_RTCS_msgpool_max = 20;
_RTCS_socket_part_init = 4;
_RTCS_socket_part_grow = 2;
_RTCS_socket_part_max = 20;//4
RTCS_create();
ip_data.ip = IPADDR(192,168,1,202);
ip_data.mask = IPADDR(255,255,255,0);
ip_data.gateway = 0;
ENET_get_mac_address(BSP_DEFAULT_ENET_DEVICE, ip_data.ip,mac_address);
ipcfg_init_device(BSP_DEFAULT_ENET_DEVICE, mac_address);
error = ipcfg_bind_staticip(BSP_DEFAULT_ENET_DEVICE, &ip_data);
// set remote host(TCPServer) socket address
server_socket_addr.sin_family = AF_INET;
server_socket_addr.sin_port = 80;
server_socket_addr.sin_addr.s_addr = IPADDR(172, 168, 1, 200);
.....
....
// loop to establish connection
do
{
socket_handle = socket(PF_INET, SOCK_STREAM, 0); //Socket Create
if (socket_handle == RTCS_SOCKET_ERROR)
printf("\n[TCPClient]: Failed to create socket.");
error = connect(socket_handle, &server_socket_addr, sizeof(server_socket_addr)); //Connet Socket with Server
if (error != RTCS_OK) //if any Error in Connecting Socket then Shutdown Socket
{
if (error == RTCSERR_TCP_TIMED_OUT)
printf("\n[TCPClient]: Connection timeout.");
else if (error == RTCSERR_TCP_CONN_RESET)
printf("\n[TCPClient]: Connection reset by peer.");
shutdown(socket_handle, FLAG_ABORT_CONNECTION);
printf("\n[TCPClient]: Retry to connect TCPServer 5 seconds later...");
_time_delay(200);
break;
}
} while (error != RTCS_OK);
....
.....
//after connection establish
recv(socket_handle, RxBuffer, sizeof(RxBuffer), 0)
..........
is RAM Size I have is over ???
or some Other problem??
also i print Socket error code 0x612 ( buffer space not available) so i expect RAM is problem??
please help me???