I try to integrate the w5500 in my design and startet with a simple server, fixed ip. I open the socket in TCP mode, wait for sock_established and send some html bytes. I see the received bytes (some browser stuff like GET / HTTP/1.1 Host: 192.168.178.33 User-Agent…). I send the answer, however, this does not arrive at the other side - instead there are garbage bytes. During further investigation, I connected a logic analyzer on the spi line and counterchecked my data in software against real transmission on the line. Good.
As a test, I read the TX_FSR register (double reading + compare), got 0x0800 at start.
After writing some bytes, this register shows garbage: ie 0x7F5A, what is really out of possible range. Again, I can see these values on the Logic Analyzer!
Additional Information: raw data log on the other side shows a repeated 2k memory content, most of the bytes are rubbish, some bytes contain my html string sent to the w5500. Seems that the chip is ‘looping freely’ through the output memory.
Sending is done with: read the tx_wr pointer, write the data at this location, increment tx_wr by sizeof(data), write tx_wr to the chip, issue a SEND command.
Can you give me a hint on this topic?