Sn_MR(ALIGN) = 0
Sn_MR(protocol) = TCP
receive buffer size is 8k.
When I receive TCP data (PC to W5300) the window size updates with the ack.
But with every TCP packet the window size decreases with packet size + 2 bytes.
That would be correct if align was 1 (packet info is 2 bytes).
image provided:
PC is 2.121.10.50
W5300 is 2.121.17.1
Packet send is 1514 bytes on wire, 1460 in payload.
window size is 880 after auto ack from W5300.
After reading the data I sent a dummy byte and window size increases to 2342 (880+1460+2???)
the same goes the other way as well.
The problem is when the PC sends the last 880 bytes, but W5300 can only accept 878 bytes.
I read the datasize from RSR register and there are no 2 bytes as header when i read the FIFO.
other info:
internal phy mode
16 bit data and direct address mode