sorry for my english. We made a few types of gadgeds with W5200, approx. 50-200 of each. Generally we can say W5200 works well. But we come across few problems. Normally working device time to time stops comunicate. Both leds turn off, device does not answer for ping. Reset of device and initialization W5200 does not help. But after power down and then up of whole device helps. I went through forum. We added some bypass capacitors, and replaced one FB with 0R rezistor. But it did not help. Where I should focus attention?
We noticed too that some devices are able to connect with LAN cable long 70m and other with 50m only. However they are identical.
Thank You very much for any idea.
I came across with issue and investigation which may help you. I have cases when both LEDs (this is exactly what caught my eye in your post) turn off for 1-2 seconds and then turn on back, interrupting communication of the chip. I figured out that it is not a chip’s problem, it is switching hub (Asus GX1005B) issue doing something wrong with its port at its end.
Thus I recommend you (a) try changing hub’s port, (b) try changing device you connect W5200 to with another one. Problem may be not in the W5200 device, it could be on another end of the wire
thank You for reaction. I do not think, that problem is in the switch. It happens on varios places with varios switches. I gathered more details. I think that problems relate to supply. I did not see it on my own eyes, reportedly time to time connection fall down during some activity on device. For example relay switching. In past we used different FB than wiznet. Now we replaced them with more similar type. I can see a bit lower noise at 3V3D. So I hope it will helps. Do You know, what can accuracy of bias rezistor influence? In The did not write a lot in tha datasheet.
Have a nice time
Hopefully you are right, but there’s another thing which can be a cause - unstable 25 MHz oscillation circuit. If I touch outputs of crystal with finger, at some point in time LEDs go off and chip stops operation. However - and it is difference with you case - when I remove finger, chip continues working. This is not exactly what you explain as you say only hard reset recovers chip, but worth knowing ensuring that you designed clocking circuit well, grounded body of crystal, and have no devices emitting electromagnetics close to clock generation circuit.
I tried to stop oscillator wiht my finger. It is surprisingly stable. To stop oscillator must be finger realy wet. I put rf card reader 125kHz and 13.56MHz near to ocsillator as possible and tried stop oscillator again. Stability was not worse.
But I am not sure about something else. Votlage at pin 14 (VCC1V8_OUT) is a bit higger, 1.93-1.97V. Is it correct? Voltage at pin 16(XTAL_VDD) is about 1.8V. I checked schematic diagram thousand times. I did not find anything wrong.
This is very good observation. Datasheet does not detail operating voltage range for 1.8V input, but using same range as for 3V3 (which is 10%) maximum for 1.8 Voltage is 1.98, and you are very close to it. Look at input 3V3 voltage, is it within spec? Can you share your circuit diagram?
I attached schematic diagram of LAN part. I compared it with various evalution boards thousand times. All values now exactly matching with reality. Wiznet, cpu and a few other ICs are powered from linear regulator TS1117-3.3. Output voltage is quite accurate - 3.27V. And it is powered from 5V switching regulator based on A8499. We use magjack bell magnetics SI50154-F.
I do not know what is going on. Let’s look into the circuit: I see that values of capacitors connected to XTALVDD differs on your schematic, and you use electrolytic cap instead of ceramic. 0R ferrite bead for 3V3D/3V3A looks strange on reference schematic BTW. I would do it properly separating these power rails with same ferrite bead as used in other power rails, and connected RCT of the transformer (jack) to 3V3A. However I hardly believe these will affect chip operation to the extent you explain.
Please take magnifier and examine quality of soldering. Higher voltage may mean that regulator misses a load - check if both 1V8 pins are properly soldered.
We used tantalum capacitor 10uF at XTALVDD from beginning. Modules WIZ820io used to use ceramic capacitor 10uF + 100nF at this pin. But later they replaced 10uF ceramic with 10uF tantalum. This thread [url]Wiz820io stops responsing to PING after few hour of running] mentions about it. On bottom of page is document Improvement of WIZ820IO.pdf. And replacing ferrite bead with 0R rezistor suggest W5200 Chip Datasheet v1.4.0 on page 12. Yes, magjack is not powered in best possible way. Boards are soldered properly in reflow oven.
But I noticed something weird. It seems Your suspicion about oscillator was right. When I touched pins of quartz with finger it did not metter. But when I touched X1 with iron tweezer, link fell down and both leds went off. I tried it many times. Sometimes was connection recovered itself. Sometimes helped reset of board (hw reset is connected to wiznet too). And sometimes I had to disconnect board from power. It is exactly state described at the beginning.
So I connected oscilloscop probe to X0. When I “connected” tweezer and my body to X1, oscillator starts run at 75MHz. And sometimes it stayed at 75MHz even tweezer was “disconnected”. Unfortunately I could not check it on randomly frozen device. Any Idea?
Can you please share design of your board so that I can see how your components and conductors were located? If possible from both sides (how many layers?)
board is only double-sided. It is my very first board with wiznet. Nowadays I would made it better.
Now I see it. Quartzs caps are grounded realy badly.
Yes, there’s a room for improvement. But as boards are already produced, let’s look into current design again.
When board stops working, does it stop working only from network side - can MCU still access W5200 - read its registers?
thank you very much for quick reply. I do not know it. Only yesterday I discovered way, how to break down lan chip. I will try it tomorrow. In the code was added routine, which trys to reinitialize w5200 after 20s without communication. It did not helped. As cpu is used stm32f103. It is able turn RST pin into out a generate rst to other devices. But reset button will not recover link each time. So I think that it would not be helpfull. Have a nice day.
I put a few lines in to main loop, which display IP address and PHYSTATUS register value on lcd during each pass. IP adr is red from internal registers W5200 too. IP is allwas displaeyd correctly. PHYSTATUS is 0x37 (when link is OK) or 0x17. W5200 communicte with cpu even though oscillator runs at 75MHz. Can we utilize somehow?
If digital core of the chip works properly than it is not crystal oscillator and chip is not completely hung when your problem occurs.
Try the following:
- turn off power save mode in PHY register and test;
- set different speed configurations - configure device at another side to be 10Mbs or 100Mbs and check how W5200 chip behaves in each case.
thank You very much for reply.
I turned off power save mode. Behaviour was same like before. Only value of PHYSTATUS was 0x27 or 0x07.
Then I replaced swich with one our older board based on ENC28J60. It works at 10M as You wanted. Wiznet seems to be realy stable. Now I can touch both quartz s pins with tweeres and link led is still on a PHYSTATUS says Link UP I did not try real communicaion. Those two devices are not able to work together. I noticed wiznet works at 10M even when quartz is shorted with tweezer.
Finally I turned on power save mode at 10M. Still stable.
I spent a few next hours with w5200. I added extra bypass capacitor 220nF at XTALVDD. As close to IC as it was possible. Its negative pole is connected to central ground pin of IC. It did not solve problem, but something has changed. When I touch X1 now, waveform at X2 is distorted again, but frequency is 25MHz still. When link works, waveform on X1is nearly sine with amplitude 3.8V But when link does not work, it is still sine but amplitude is 1.8V. Reset will not fix it. A few times happened that amplitude was recovered after untouching to 3.8V, but link was not recovered.
I was yesterday a bit confused. Oscillator after crash runs at 75MHz with half amplitude.
One more thing, which may be helpful - I do not know which controller and driver you use for the chip, but: ensure that for socket operations you use whole 16-bit address pointers, that you do exactly as it is advised in datasheet (for example)
And not writing window-size masked pointer into the address pointer registers.
thank You for reply. We use cpu stm32f103 and libraries from wiznet. Is there possibility to knock link down writing something wrong into W5200 registers? I did know it. So I will check code properly.
By the way. I found WIZ820io module in my drower. It is improved according to document which I had found before. So I connected connected it to my board and did test with tweezer. As I had described before. When I touched X1, amplitude become smaller, but still it was 25MHz only. And link went off. Ability to recover link after untouch was not 100% it was realy high. So i think that problem is somewhere in hw.