W5300 receive is incorrect

Hi
I have board with 5300 chip and control with AVR
Every thing it’s OK just when I send data from PC to w5300 receiving data and packet size is incorrect. Any body can help me?

You must give more troubleshooting information about your issue and show the example, what is wrong.

Dear Eugeny
Every thing is OK I have ping packet also when I send some byte from w5300 to pc I can get it correct but when I send from PC to w5300 RSR size is correct but packet size and data is incorrect.

Then you most probably read wrong part of the buffer. You do not say which protocol you use - TCP, UDP, IPRAW or MACRAW. Do you know what should you expect in the buffer and where this information must be located? I recommend you study the datasheet and check your code to ensure you do things correctly.

I use TCP two first byte in Rx-FIFO is packet size and other one is data

I asked for example. Give example of the case when your W5300 receives packet, tell us what is the packet data size sent by the PC, value in RSR after W5300 receives data and value of “byte size of DATA packet” you read from the RX buffer. Also tell us if data following this data size word in RX buffer represents user TCP/IP data sent by the PC.

For example when I send 1 2 3 4 as string I get RSR=6 packet size som time 90 sometimes 180 and data 34 34 34 33 that I should get 49 50 51 52. I should mentioned somtims after power up borad for first send I get correct data but when I repeat send I get wrong data.

I do not understand what you say.

If you send “1234”, only 4 characters over TCP, then RSR must be 6, and first two bytes at the RX pointer must read as 0x00 and 0x04 (or vice versa depending of state of FS bit of MR).

Did you confirm with Wireshark that networks gets the data you expect it to have?