I apologize for the long description and if my English is poor as it is not my native language.
I am new with W5500 and for the last month I was able to play with it using my ATmega32A by creating a very simple HTML page and view it with a browser.
My code is based on the io Library and some contributions on the internet. Everything was running fine but I noticed that some times the web page is not displayed when I refresh the page on the browser. However, when I refresh several times or when press CTL+F5 the page usually displayed correctly.
when trying to find out what is the problem, I found that sometimes W5500 miss sending part from the page and send the rest. For example, assume if my page is 500 bytes, then the browser misses the first 260 bytes and receive the rest, which of course a corrupted page. But when I click refresh two or three times it displayed completely.
After spending 3 weeks in investigation, I can confirm that the send() function receives the correct parameter which contain the required data to send, and as the page sometimes display correctly, then SPI code supposed to be working fine.
I used Windows network monitoring to capture data sent from W5500 to the browser, I found that the HTML data incomplete and have a part of it missing and the remaining part is sent.
Now I am sure it is not browser or HTML code problem. And I am sure the code is sending data correctly, but due the nature of SPI, I can not confirm if my PC received it completely.
• The problem is always with the beginning of the page. If the beginning of the page is received, then whole page will be received.
• I tried to simplify the code as much as I can, but the same behavior exists.
• I tried to send the HTML data in smaller parts (for example every part is 100 bytes) but same behavior.
• I tried to replace the W5500 with another module. The same.
• I am using ATmega32 configured with internal clock 8MHz, and SPI clock is Fosc/128
• I also tried to use external 16MHz crystal. But the same problem
Do you have thoughts may help me figuring out the problem.