Hi,
I have a task which sends 1460Bytes UDP datagrams every 0.1 seconds. I'm using IAR+k60n512(rev d)+rtcs onwindows and I'm watching packets with wireshark. I have two problems there:
- First, I have a very high rate of lost packets (ok it's UDP so it should happen sometimes, but I would expect it to be lowerthan 20% :s)
- Second, my network task sometimes stops, with status "Msg send blocked". Then the RTCS task won't even answer toICMP requests.
while(1){
if (_lwevent_wait_ticks(&NETW_lwevent, 1, TRUE, 0) != MQX_OK) // it is triggered every 0.1s
_task_block();
_lwevent_clear(&NETW_lwevent, 1);
byteCount = sendto(sock, &buffer, sizeof(buffer), 0, &raddr, sizeof(sockaddr_in));
if (byteCount != sizeof(filterResult)){
printf("\nsendto() failed with count %ld and error %lx\n Task blocked.", count, RTCS_geterror(sock));
_task_block();
}
}
The microcontroller is a bit busy doing other things (from which writing to sdcard, filtering, sampling...) but I set thepriorities of my network task and RTCS higher (lower value) than the other tasks.
I tried the flag RTCS_MSG_NONBLOCK, but still get the same kind of behavior.
I noticed also that even with the provided rtcs examples, it sometimes fails to answer ICMP requests. Do you think it couldbe related to hardware? I already corrected the sdcard+eth issue...
Best regards.