---
title: "W5500 SPI corrupted data"
url: "https://maker.wiznet.io/forum/14191"
markdown_url: "https://maker.wiznet.io/forum/14191/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "xitr"
created: "2021-03-16T12:07:27+09:00"
last_activity: "2021-03-24T11:41:05+09:00"
language: "en"
views: 449
replies: 2
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# W5500 SPI corrupted data

## Question

Asked by xitr on 2021-03-16 in Ethernet Chips.

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](http://wiki.amperka.ru/%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D1%8B:ethernet-shield)

## Replies

### Reply 1 by becky, 2021-03-19

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.

### Reply 2 by xitr, 2021-03-23

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

---

Source: https://maker.wiznet.io/forum/14191
