---
title: "W5500 suddenly didn't work"
url: "https://maker.wiznet.io/forum/12405"
markdown_url: "https://maker.wiznet.io/forum/12405/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "jun"
created: "2017-07-31T10:29:18+09:00"
last_activity: "2017-09-15T08:04:02+09:00"
language: "en"
views: 1803
replies: 7
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# W5500 suddenly didn't work

## Question

Asked by jun on 2017-07-31 in Ethernet Chips.

W5500 of our machine didn’t work august,last year, the RST of firmware had no effect, only after power off and power on, the machine can work normaly.
Today, it happend again.
The MCU and switcher always worked normaly,only W5500 can’t work. The FAE told ne ,maybe the PHY of W5500 crashed.
I have used the Network transform.
How to find the reason of these problems? How to solve it?Thanks

## Replies

### Reply 1 by Eugeny, 2017-07-31

![](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/48.png) jun:

> W5500 of our machine didn’t work august,last year, the RST of firmware had no effect, only after power off and power on, the machine can work normaly.

The cause can be anything from wrong crystal used in the device to the application (driver) performing wrong actions on the chip.

![](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/48.png) jun:

> The MCU and switcher always worked normaly,only W5500 can’t work.

How it does not work? Is link LED turned on? Is chip accessible through SPI? What device at another *physical end* (switch) sees?

![](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/48.png) jun:

> The FAE told ne ,maybe the PHY of W5500 crashed.

Is there any evidence of the PHY overheating? Which conditions your board operates in?

![](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/48.png) jun:

> I have used the Network transform.

What is it? Gaming API?

![](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/48.png) jun:

> How to find the reason of these problems?

First of all you need to find the way to reproduce the problem.

![](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/48.png) jun:

> How to solve it?

And then, when you will find a way to reproduce it, start debugging it finding in which state chip is, can it be software-reset, would it be just enough to reset PHY, or there’s some software bug, or chip just overheats, or you have component layout on the board, EMI, crosstalk or whatever.

### Reply 2 by Edward, 2017-08-01

I need more detail information.
How didn’t work?
Just not operating RST? or not operating chip?
And Is it use 25Mhz in crystal?
If crystal is 25Mhz, you check load capacitor.

And it need more debugging information.

### Reply 3 by jun, 2017-09-14 (in reply to reply 1)

[![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/3/3855026b4d3f018424167656b3534df570fad769.png) image1261×162 7.11 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/3/3855026b4d3f018424167656b3534df570fad769.png)

Thanks your help ，and I find some problem by using Wireshark. My machine‘s IP is 192.168.111.215, but the IP become 145.72.90.141 after later. At the same time,the server‘s IP become wrong,the IP came from a old message.
The appearance i found only are that, the new IP is part of the machine‘s MAC adress, and the server IP came from a old message.

[![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/0/026484e8db8a4a18e731abdedc5b2ca88e458ceb.png) image1323×508 50.9 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/0/026484e8db8a4a18e731abdedc5b2ca88e458ceb.png)

[![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/6/6a4f548dac7377a2af12dd6d64146462093ad57d.png) image1348×496 49.8 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/6/6a4f548dac7377a2af12dd6d64146462093ad57d.png)

[![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/7/71755497cb488c4d26104457e0515428ce104a31.png) image1297×506 48.4 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/7/71755497cb488c4d26104457e0515428ce104a31.png)

### Reply 4 by jun, 2017-09-14 (in reply to reply 2)

I found some new, please analyse for me ,thanks

### Reply 5 by Eugeny, 2017-09-14

Your problem seems to be that you try opening another *concurrent* TCP connection to the same remote host with the same source and destination port numbers. It is not allowed; you must use at least one different value for these three. The obvious different value would be source port.

Thus if you open one connection, you use
Remote IP=192.168.1.100, source port=60005, remote port=60005
And when you open second connection, you may use
Remote IP=192.168.1.100, source port=**60006**, remote port=60005

In general reusing TCP ports is not a good practice, because if old port combination is still cached on the server side, its TCP/IP stack goes crazy and denies both connections.

### Reply 6 by jun, 2017-09-15

Because something ,maybe the network is in high pressure, our machine can’t get the response from Server，so it try to link again and uses the old port.
According to what you said，I should use a new port to connect the Server?Just like: Remote IP=192.168.1.100, source port=60006, remote port=60005.

### Reply 7 by Eugeny, 2017-09-15

![](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/48.png) jun:

> so it try to link again and uses the old port

If connection is really lost, you have to connect again from the scratch - you do not have any other way with the W5500 TCP/IP stack (you can not see what exactly going on in the network - e.g. RST packet, retransmissions etc). The only indication you can get from W5500 is socket reset state and timeout interrupt bit setting. If it happens, you start everything from scratch. And unless you set up remote server to check and reply only for the remote machine having local port 60005, you must use another local port to ensure you are able to connect to its TCP/IP stack properly within short timeframe.

Thus yes, please use another **source** port (60006) when connection drops (you see that socket is closed and/or respective bits are set in Sn_IR).

---

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