I have a problem with W5100.
I’m using W5100 as a TCP-server. And sometimes W5100 stops sendind TCP-packets and asserts DISCON interrupt. Usually, there are one or more broadcast ARP-packets.
The W5100 (IP 192.168.8.249, port 8888) and a PC (IP 192.168.8.88) are connected to one switch in a LAN. The uC reads TCP-data from the W5100 and re-sents the same data back (using DMA).
Log from the PC.
W5100_RST_flag1.zip (791.6 KB)
The supposed sequence of events (from Wireshark and uC logs):
- The last data sent from PC to W5100 is Packet #27475
- Next packet was a broadcast ARP-packet.
- uC read data from packet #27475 and sent data back to W5100 (starts DMA writing). On PC (Wireshark log) there was no answer from W5100 (no TCP-data, no empty TCP-packet with ACK flag).
- 300ms later
Packet #27477 - first TCP retransmission from the PC
TIMEOUT interrupt from the W5100 socket (Socket Status Register was 0x08),
no actions in uC. - 300ms later
DISCON interrupt from the W5100 socket, uC inited the W5100 socket. - 300ms later
Packet #27481 - second TCP retransmission from the PC
Packet #27482 - W5100 sent RST flag (because socket is closed)
I didn’t close connection neither in W5100 server, nor in PC client.
Why W5100 asserts TIMEOUT and DISCON interrupts?