WIZnet Developer Forum

W5500 Down/Lose Connection after some hours/days

Hello, I am building door lock access system based on stm32f103c8t6 Blue Pill.
I use W5500 for ethernet connection to http server. Power source is 12V 3A Switching power supply then connected to adjustable regulator MP2307 module which set to 5V.

I use W5500 module bought from china as seen below.

I use mac address from microchip serial eeprom which have been included official mac address. I use 2 relay module which sold many in market to control electric door lock.

The system send rfid data in http protocol to apache server. The apache server was built on HP tower server using intel xeon E3 1220. The system works perfectly, electric door lock can be swithed, rfid data also can be sent to server. I can ensure the http communication was reliable, I can ensure socket closed after data was sent.

Below is example of http communication debug in wireshark, but it still connected to my personal laptop, but I can ensure that server communication also the same.
11 01:18:56.007945000 Microchi_41:cd:5d Broadcast ARP 60 Who has Tell
12 01:18:56.008018000 Fujitsu_c8:e5:29 Microchi_41:cd:5d ARP 42 is at e0:18:77:c8:e5:29
13 01:18:56.008869000 TCP 60 1045→80 [SYN] Seq=0 Win=2048 Len=0 MSS=1460
14 01:18:56.009342000 TCP 58 80→1045 [SYN, ACK] Seq=0 Ack=1 Win=8192 Len=0 MSS=1460
15 01:18:56.010189000 TCP 60 1045→80 [ACK] Seq=1 Ack=1 Win=2048 Len=0
16 01:18:56.011147000 HTTP 172 GET /ci310/nfc/index/c14a8dab HTTP/1.1
17 01:18:56.062179000 TCP 54 80→1045 [ACK] Seq=1 Ack=119 Win=64240 Len=0

now I connect some the door lock system (2-3 device) to TP Link switch. I also have been used various switch include cisco switch, the same problem.
So, my problem is W5500 connection is down after some hours varying between 7 hours to 24 hours, sometime can up until 1-2 days, but it then will down, up time is unpredictable. When it is down, W5500 can not be ping. And rfid data in http also can not be sent. Even if I remove the electric door lock, it also down after some hours.
Even I use original belden cat5e ethernet cable this problem also occur. When I disconnect the cable from the switch and then connect directly to my laptop, the device (door lock system) also can not be ping.

Device reset or power off then power on is only the solution for the device can normally work again, but it then will down after some hours.

Please anyone help me.

Thank you.

This is physical W5500 that I was used.

Wireshark Debug

Does the word “now” means that you have this board connected differently before (e.g. direct connect to server) and it was working without this problem?

First, it is good that it is reproducible. I would do the following:

  1. traffic analysis. Put some PC in network bridge mode between W5500 device and network, with PC being directly connected to the W5500. Have Wireshark running on this PC, and have this PC pinging W5500 (through direct connect). As soon as W5500 gets stuck, analyze the packets which it was sent to just before this condition happens.
  2. power quality. Ensure that power supplied to W5500 is clean and enough. Enough power should not be issue as MP2307 can provide up to 3A, well enough for the application unless you power something else from it (e.g. relays which consume a lot of current when switched). So if there’s an issue on the power line when something momentarily consumes a lot of power (before or after MP2307), W5500 may latch up. What is the relay connection circuit? Do you use flyback diodes?

Hello, based on email replied from the wiznet technical support, this problem is caused by w5500 is reset externally.
It maybe caused by ESD.
What is ESD actually ?
Is ESD attack on PHY line or spi line or reset line ?
Anyone experience, how to solve this problem ?

But it is easy to test. When chip is soft or hard reset, it has network property registers cleared. You may consider putting regular checks of the W5500 SIP registers if they are having values required. As soon as value differs, you perform software reset using MR register, and reinitialize W5500.

I explained workaround above. It is NOT a solution. To find a solution you must:

  1. confirm that W5500 does really reset or deadlock;
  2. find the root cause of the failure.

Regarding ESD (you can find respective Wikipedia article on it) it is low probability that issue comes through network cable as it is DC decoupled (however you may consider using shielded twisted pair as a test); you must consider (a) power supply issue or (b) some electromagnetic interference (for example, induced by the relays). You must also consider having proper design of the relay circuits (e.g. protection diode) as switching relay consuming power may cause instability in operation of the digital part of the circuits. I mentioned it before in my previous post, you did not provide related circuit and any information regarding this part of the device.

I will try this first.

As you see above is W5500 module I used. When this is module work normally and there is request or send data, I try place DC PCB drill near the reset pin (BLue Arrow) of the module, I turn on the drill then I get information from arduino serial monitor that IP, subnetmask, default gateway and DNS become as shown below. As the same time I also look at the 2 LEDs of this module, these LEDs suddenly turn off then turn on again, this maybe because of reset.

This should not be a problem because I used 12V 3A swithing power supply.

I use common 2 relay module which maybe sold widely, below is the picture and there is protction diode in the module.

The distance between RJ45 in the W5500 module and the relay is about 10 CM, distance between transformer power supply and the main module is longer (about 15CM)
Is this condition can cause interfere ?

thank you

This maybe W5500 has been reset externally cause of ESD in the reset pin, but where does ESD come from ?
I also never write software reset code in the sketch.
Or maybe there is condition which can cause W5500 reset by it self (maybe software reset), maybe somethin about heating of the chip ?
But I also have placed heatsink on top of the chip, so heating should not be problem.

This is very important information. So I looked at the design of the module.

I must say that miniaturization comes at the cost. This module is having several obvious issues in its design, and these issues most probably affect its operation in your conditions.

To see design requirements yourself, go here, click “HW design guide” icon, open zip file, and then W5100_Layout_Guide.pdf file. This guide applies to whole W5xxx family.

So the issues I see:

  1. I can not find circuit diagram of the device (except your provided in the question - where did you find it?). I would never buy it without having full specification (including board layout and circuit diagram);
  2. Crystal is too away from the chip. Longer conductors -> more probability for interference. It is clearly wrongly oriented, with resistor and capacitors placed at even longer distance;
  3. RST conductor is located exactly at the bottom of the crystal and its circuitry. Crystal is running at 25 MHz, with internal chip PLL converting it into 125 MHz, and it is obvious that minimal EMI onto the external clocking circuit will cause chip to suspend (in best case), reset (like in your case) or lock up. If you touch this clock generation circuitry with wet finger, I am sure you will have the same behavior - all LEDs will go out until you remove the finger.
  4. From my experience the best clocking circuit for W5xxx seem to be made of the dumbest crystal like this (look at the picture, in general crystal should satisfy requirements listed in the datasheet). There were custom implementations with brick-type crystals or generators, but they did not work well;
  5. As I do not have circuit I have circuit in your question, but questions remain (1) grounding of the jack (through additional cap? - this circuit is used for separate magnetics and jack, here we have integrated magnetics); (2) LED traces are too close to the analog pins.

In your case: I think you found the vulnerability in the design of your door lock solution; the only way I see here is to shield everything including board itself and cable coming to its connector, and ensure the cable length as short as possible, and location of cabling as far as possible from the outer surface of the door (so that someone coming to you with drilling device or other device generating electromagnetic field would have minimal chances influencing your device with EMI).

Thus at this point I fully agree with WIZnet engieers’ conclusion, and think that this module can not and should not be used in industrial applications.

Here is schematic and PCB I get from the seller.
W5500.zip (73.2 KB)

Bad crystal should be affect on error data communication, but as far I used this module even I can handle up to 5KB or 5120Bytes (this only my limitation array variable in sketch) encrypted HTTP data sent from the chrome browser and then decrypted back by the main system (STM32 and W5500 module) without no error (and result the same plaintext), and wireshark debug shows all green mark packet.

When I try place solder tip (solder is turn off) onto the RST terminal, the W5500 module is restart also. The STM32 module (blue pill) is stronger, with the same solder tip placed onto the RST of STM32, The STM32 keep running, no reset.
But with finger touch or any conductor contact with my hand then put onto STM32 RST pin, the STM32 is got reset.
Maybe other members here can test with their owned W5100 or W5500 module, turn on the module and place solder tip (solder is turned off) onto the RST pin of your module, with you only holding the isolator body of solder (no touch the solder AC plug). And what is happen ?
I will try to cut the RST line in the bottom of this module (and keep the 10K pull up resistor), then touch with the solder tip as the case above, can it be strong as the STM32 module. :sunglasses:

I think the main problem is W5500 reset is very sensitive to ESD or EMI or other unknow case. Wiznet also does not provide any recomendation for protection of their RESET pin in their hardware design guide documents/files. They should be care about this serious problem and give this warning notification/announcement urgently to their buyers and hardware developers.
Because W5100 or W5500 should be suffer in the real environment with noisy and many of EMI or ESD attack, which I was experienced.

It is wrong assumption that unsuitable crystal causes bad communication only.

Do short test, take one probe of the multimeter in AC voltage measurement mode into your hand touching the probe, and put another probe to the ground of the W5500 module. You may be surprised to see tens of AC volts.

It is a task of board designer to ensure device is EMI protected - through board design and application guidelines. Chip manufacturer can only bear responsibility for chip ESD guidelines, and this info can be found in chapter 5.2 of the datasheet. Applying external AC or DC to the chip through finger, iron tip of whatever is simply out of electrical specification for the chip.

Hi all, I have exactly the same problem with a different W5500 shield https://robotdyn.com/ethernet-module-w5500-3-3v-5v.html
Since the reset line of the module is not used (originally it was connected with the board reset line), I decided to cut the reset pin of the shield. In this way the RST pin is pulled up only to 3v3 by a 10k resistor (instead of the 77Kohm suggested in the datasheet). I think that a lower value is better.
Despite this I continue to have unexpected reset. For example I can reproduce the problem by putting the multimeter probe in order to measure the RST-GND dc voltage.


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