Im trying to send 1K chunks of firmware and software to a SC20100 over TCP.
At random moments, the socket.receive or socket.send methods will cause the entire system to hang up. I’ve narrowed it down to this line in the libraries:
var sent = this.ni.Send(this.m_Handle, buffer, offset + totalSend, size - totalSend, socketFlags);
Some times, when this method gets called, the entire system locks up. Visual studio loses debug connection and the module needs a complete power reset to function again.
I can not see what the code of the function does, but my suspicion is that it probably causes some kind of while loop hangup or similar.
I am trying to get a sample project so you can reproduce it, in the meanwhile: can you look at the code and see if there is a possibility of a loop hang or similar? Could this have something to do with the non blocking changes to sockets?
I am using a SC20100 with embedded emac and the DP83848KSQ network PHY. This is on the latest firmware. It happens on both a switched network and a direct connection to my laptop.