WIZnet Developer Forum

W5500 SPI corrupted data

Hello, I need help.
I am making a tcp server. But I can’t get the data completely.

test1:
I am sending 200 bytes from the computer over tcp.
getSn_RX_RSR(http_socket) returns 200.
recv (http_socket, http_buff, 200) returns 200.
But the data in http_buff is corrupted.

test2:
I am sending 200 bytes from the computer over tcp.
getSn_RX_RSR(http_socket) returns 200.
recv (http_socket, http_buff, 100)
HAL_Delay(1) // make a delay
recv (http_socket, http_buff, 100)
HAL_Delay(1)
It works but doesn’t look right.

What am I doing wrong?
Full code: https://github.com/xitr/w5500_test
SPI analysis and pc’s log: /Result/test1 and test2

I am using Ethernet Shield with W5500 and STM32-H103.
http://wiki.amperka.ru/продукты:ethernet-shield

Hello,
Could you explain more precisely what you mean by not look right and being corrupted.
I don’t know what is in the Result.
Please know me what data was sent from the PC and what data was received.
I wish you checked through wireshark.

The problem was in the hardware. IOREF pin must be connected to 3.3V on my board.

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.