I’ve encountered a strange problem.
I’ve set up my W5100 to use only one socket - SOCKET0. Both RX and TX buffers are configured to 4kB. RTR=4000. RCR=5. Using W5100 in bus mode (15bit address, 8bits data). Socket is configured as server and if there is any client connected sends TCP segment with 1460 bytes of data every 12ms. Before putting data to W5100 I am testing if there is enough room in the TX buffer. If there is no room I drop frame and try to send during next 12ms slot. I am using ioLibrary from https://www.wiznet.io/product-item/w5100/.
The issue I’ve encountered is about that from time to time packet are missed. Missed packet were put into W5100 TX buffer but weren’t received by host. In the slot time for the missed packet there is TCP ACK from W5100 which is identified as duplicate by Wireshark. It is marked on the attached picture. I didn’t find any regularity. Sometime it happens very often and somtime pretty rare. Wireshark identifies TCP ACK packet as duplicate of SYN+ACK packet send when connection was created.
What could be a root cause? How to fix this?