---
title: "Wiznet please reply: Data corruption"
url: "https://maker.wiznet.io/forum/11036"
markdown_url: "https://maker.wiznet.io/forum/11036/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "Eugeny"
created: "2015-05-11T21:39:44+09:00"
last_activity: "2017-05-04T08:38:33+09:00"
language: "en"
views: 4104
replies: 38
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Wiznet please reply: Data corruption

## Question

Asked by Eugeny on 2015-05-11 in Ethernet Chips.

[size=150]Edit as of Oct 02 2015: the issue was solved.[/size]
Explanation can be found here: [url][\[From QnA\] WIZ108SR RS485](https://forum.wiznet.io/t/from-qna-wiz108sr-rs485/137/1)].
If you experience issues like this you can contact me for tips.
…

Problem: I receive correct volume of data, but data is corrupt.

I use TCP / HTTP communication, using hardware interrupts. Sending exactly 128 KBytes of data plus HTTP header. On approximately 40th Kilobyte image I receive starts getting differences in 16-bit simple checksum (word sum of all bytes).

I do the following:

1. setting all registers in W5100, preparing interrupt handler, opening TCP, establishing connection.

2. I start getting interrupt requests.

3. At the entrance to interrupt routine I check socket IR flags, and reset them all immediately writing 0FFh into respective IR.

4. Then I get count of bytes from RSR register and read them from the W5100’s RX buffer, then update RXRD register and write RECV command to command register of the socket.

5. process continues until remote host breaks established connection.

As I said - size of data is correct, but contents are corrupt.

Another issue is that communication is very slow. Receive/send LEDs flash once per second, and transfer takes 20 seconds. It is 6 KBytes per second. Given that algorithm and CPU I use are not fastest, let’s take “real” speed of service is 10 KBytes per second. Nearby computer running Windows XP achieves 500 KBytes per second for the same web-server from the same subnet.

If my algorithm is correct, I suspect W5100 experiences errors during communication and is busy with retransmission - retry is set to 400ms and 8 attempts. Is it possible to get such retransmission/line quality statistics from W5100?

Some time ago I sent several emails to Joachim Wuelbeck @ Wiznet asking for correct model of RJ45 with built-in magnetics. He never replied. As I had to proceed with project, I chosen J1006F01P, which has symmetrical transformer, but slightly different circuit diagram (comparing to sample wiznet uses) without 75 ohm resistors and 1000pF capacitor onto the ground. Can it be the cause? Again, how to prove it - any statistics in W5100 on its quality of communication?

In overall I find Wiznet hardware documentation, and documentation in overall to be of poor quality - some areas are covered by just several words (e.g. RJ connector and transformer types), some have serious mistakes (that issue with read-only socket IR register which appeared to be have been writable - in W5100 and W5200 documentation). Support is also inadequate to the complexity of device.

Eugeny Brychkov, Ph.D.
[url][https://www.linkedin.com/in/brychkov\[/url\]](https://www.linkedin.com/in/brychkov%5B/url%5D)

## Replies

### Reply 1 by hjjeon0608, 2015-05-12

Hi,
At the 1st question.
Checksum data is wrong in TCP header?? or data are difference sent data with received data??

If later, check send data from packet capture program like wireshark and then check data from sender.

2nd.
Set 5th bit of Sn_MR: Not use no delayed ACK option.
If, transferring speed is up.

And RJ45 is look find to use.

Thanks.

### Reply 2 by Eugeny, 2015-05-12

Hello Tony, thank you very much for reply.

hjjeon0608:

> 2nd. Set 5th bit of Sn_MR: Not use no delayed ACK option.

Time decreased to 7 seconds (from 20), data transfer speed (from server to final memory in machine) is 18.7 KBytes/s. Good result.

hjjeon0608:

> And RJ45 is look find to use.

I am sorry I did not understand your statement. You mean J1006F01P is fine to use?

hjjeon0608:

> At the 1st question. Checksum data is wrong in TCP header?? or data are difference sent data with received data??

Data difference. Image on the server is correct, it sends image properly to other host (PC downloads image with correct checksum).
I will be making more tests and let you know.

### Reply 3 by hjjeon0608, 2015-05-12

Hi,

Sorry, I look another datasheet J1011.
J1006 is not correct at W5100.
The magjack must have resistor and cap.

If send data is correct, I think your address access to buffer is wrong or store buffer data to memory is wrong.

Plz more try to debug.

### Reply 4 by Eugeny, 2015-05-13

Tony, thank you very much. I will order J1011F21PNL.

Please advise if the following situation is valid for W5100.

I get interrupt with packet size 0b68h and RXRD=0. I process 300h bytes, and update RXRD register to 300h, and write RECV command allowing W5100 receive further bytes until it fills its receive buffer and this 300h bytes space which was “freed”.

I am asking because datasheet only gives example of flushing whole receive buffer and only then updating RXRD. But can I do it partially? I also guess if this partial update is valid situation for W5100, it can increase speed of communication.

Edit: Related question: is TCP data contiguously loaded into W5100?

Is it valid to calculate RX read pointer once (using RXRD), and then flush data contiguously until RSR becomes 0 and connection is terminated by remote host? RXRD will loop through 0000-FFFF space.

Such handling will simplify the algorithm, and will make it much faster. I use below 1MIPS CPU and program in assembler, and each additional relatively complex calculation adds delays and complexity.

### Reply 5 by Eugeny, 2015-05-13

Ok, I took some troubleshooting steps, here’s report:
00003F63: FE 59
00015F61: FF A4
First column is address in image, second is byte is from original image, and third from image received by W5100. So we have 2 corrupt bytes for 131072 bytes received. I will wait for new jack and see.

[size=150]Tony[/size], do termination resistors should have exactly 49.9 Ohm value? I was unable to find such nominal, and used 51 Ohms instead (CAY16-510J4LF). Nominal tolerance (I guess 1%)? Again, datasheet does not state anything about PHY connections, nominals and tolerance…

### Reply 6 by Eugeny, 2015-05-16

I replaced J1006 with J1011F21PNL, replaced 51 Ohm resistors with 49.9 Ohm resistors, simplified algorithms as much as possible to minimize errors in data processing. Calculation of checksum by 8192 chunks of 128KBytes image gives differences in three pages. DIfference is slight (~one byte corruption per page), but in case of executable code it is fatal.

What’s next?
I will go to different forums asking people to perform data checks on their devices and let’s see if they have same issue as I do.

Edit: so far here
[url][Data corruption with W5100 (and other Wiznet products) - Networking, Protocols, and Devices - Arduino Forum](http://forum.arduino.cc/index.php?topic=323384.0%5B/url%5D)
[url][https://plus.google.com/communities/109883731954182375648/stream/62e02ee7-7311-4788-8cb3-78d10c315c75\[/url\]](https://plus.google.com/communities/109883731954182375648/stream/62e02ee7-7311-4788-8cb3-78d10c315c75%5B/url%5D)

### Reply 7 by Eugeny, 2015-05-16

Ok, we have some pattern. Here’re samples to downloads and differences I made:
First byte is one received by W5100, second - original byte. HTTP Header size is 01A5h.

`000034EB: C4 FE 000150E8: C5 3F 000176EA: 3B 1F`

`000034EB: C4 FE 0000C9EA: 0F FF 000150E8: 5E 3F`

`00000EE8: A0 FF 000030EA: 03 C7 000030EB: C8 AF 000034EB: C4 FE 000150E8: 5E 3F`

`000030EA: 03 C7 000030EB: C8 AF 0000C9EA: 00 FF 000176EA: 3B 1F`

`000034EB: C4 FE 0000C9EA: 0F FF 000150E8: 5E 3F 000176EA: 3B 1F`

`0000C467: F0 BF 0000C663: AA BF 00015F61: 33 FF`

`0000C663: AA BF 00015F61: 33 FF 00018C67: 39 7F 0001D462: 8F FF`

`00003F63: 59 FE 0000C467: 0C BF 00015F61: A4 FF 00018C67: 39 7F 00019462: 0F 7F 0001D462: 8F FF`

`0000B161: 24 FF 0000B163: 94 FF 0000C663: AA BF 0001C063: 98 FF`

### Reply 8 by Coccoliso, 2015-05-17

I think you have a charset converting problem UTF-8 / Unicode between the different systems.
The file on the server is UTF-8 which contains unicode characters so to understand :
ASCII character “%” is H25 Ascii code, in unicode is HFF H05 (2 bytes) but translated in UTF-8 becomes H85 HBC HEF (3 bytes).
Could all be fine until they are accented characters that depend on the country code and which are treated with some PC softwares in windows-1252 encoding.
When you download a file in HTTP is the server that transcoding it while sends.
Any test begins from a file that the server has processed and perhaps may be different from the original … then attach a zip of the source file and put it in the post.
It would be better understand the operations that you carry to transfer the flow between systems.
It seems that here had suggested something similar [url][Data corruption with W5100 (and other Wiznet products) - #16 by SurferTim - Networking, Protocols, and Devices - Arduino Forum](http://forum.arduino.cc/index.php?topic=323384.msg2234687#msg2234687%5B/url%5D)

### Reply 9 by Eugeny, 2015-05-17

![](https://avatars.discourse-cdn.com/v4/letter/c/e47774/48.png) Coccoliso:

> I think you have a charset converting problem UTF-8

Unfortunately it is NOT the case. I use cURL to query file from my PC, server responds with

`HTTP/1.1 200 OK Server: nginx/1.6.2 Date: Sun, 17 May 2015 11:51:38 GMT Content-Type: text/html; charset=utf-8 Content-Length: 131072 Connection: close Accept-Ranges: bytes Expires: Mon, 18 May 2015 11:51:38 GMT Cache-Control: max-age=86400 Vary: User-Agent, Accept-Encoding`

and FC /b (utility to compare files in binary mode) says no difference. File arrives without modification. I would be astonished if W5100 parses HTTP headers and change contents according to content type. 99.(9)% it is not.
If there would be conversion, I would get wrong file size. I get exactly the size of original file, with just several bytes corrupt.
In contrast with Arduino, I use parallel access to W5100. I checked access timing is met. I checked all soldering and it is fine. I will replace the chip.
It will be second (in my life) W5100 I replace from 7 I bought. 28% is very high DOA rate.

### Reply 10 by Eugeny, 2015-05-17

I replaced the chip. Same situation. Checksum, with each transaction, slightly changes between 5c00 and 5e11 (equals to 0 to 4 corrupt bytes).
Wiznet, please give me FAE/support engineer to figure out what is wrong. I need one person to dig into what I do, I will supply all the needed information including source code.

Edit: differences (first is original, second - received)

`0000B163: FF 94 0000C663: BF AA 0001C063: FF 84`

`0000B163: FF 24 00019466: 7F 0D 0001C063: FF FE`
You notice that bytes received incorrectly have maximal bit number set - 7F, FF, BF - each having 7 or 8 of 8 bits set.

I have made two test files - first full of FF, another is with alternating FF 00 - both transferred correctly.
File filled with such data

`00000000: AA 0A 00 00-00 00 00 BB-A0 BB 00 FF-F0 FB A0 FF 00000010: FF FF A0 BF-FF FF A0 0B-BF FF A0 F0-0F FA A0 A0`
also arrived without corruption.

Ok, I cut A000-C000 page from the file which is being received corrupt, filled 128K with this 8K data, and got the following:

`00003163: FF 24 00005163: FF F0 00007161: FF 44 0000B161: FF 44 0000D161: FF D0 0000F163: FF 94 00011163: FF 94 00013163: FF 00 00015161: FF 44 0001B161: FF 44 0001D161: FF 4D 0001F163: FF 94`
Non-corrupt pages are: 11xx, 31xx, 91xx, 17xx, 19xx - 5 pages in contrast with 11 pages with corrupt byte in approximately same location.

Now I cut 2000h page from A800-C800 to see if data locations will change (in other words, if corruption is related to the byte offset or its value), and here’s what I get

`00001F5F: FF F9 00003F5F: FF F0 00004961: FF DD 00005264: FF CC 00007264: FF BB 00007E5F: FF 00 00008961: FF F0 0000A961: FF DD 0000B264: FF CC 0000BE5F: FF AF 0000C961: FF 44 0000F260: FF 00 0000FF5F: FF 00 00011264: FF 99 00011F5F: FF 44 00013264: FF 99 00013E5F: FF AF 00015260: FF 00 00015E5F: FF AF 00016961: FF F0 00017F5F: FF 29 00019264: FF CC 0001A961: FF F0 0001DE5F: FF AF 0001F260: FF 00 0001FF5F: FF 0B`
Note that in previous test addresses were x161 and x163, here we have a couple of x961, which is exactly +800h offset I took in data.

[size=150]From this I make a 60% probability conclusion that it is NOT problem of W5100 internal SRAM which holds data, it is NOT a problem of my receiving code (which I reworked several times with same corruption result), it is NOT related so occasional corruption of the memory cell (e.g. incorrect interrupt handling in my machine), it is rather related to the data pattern being transferred. [/size]

However next test puts me in confusion: I took 15h bytes shift: a015 to c015, and got the following:

`00002263: FF 0A 0000E263: FF 0A 00012263: FF 0A 00014263: FF 0A 00018263: FF 0A`
All FFs in location offset x263 are changed to 0A. Interesting that looking to all the numbers corrupt locations are in xx5f-xx66 range.

Here’s advanced test: I set up Apache web server on my PC, and use Wireshark to capture data on its LAN interface.
I downloaded the file under question from this web server, and I see that remote machine received discrepancy/corruption is (received-sent):

```
0001D0C6: 1B FF
```

and Wireshark confirms that in this location + header size 0140h web server sent “FF”. Thus web server sends correct data to W5100.

Small final note: I have other executables - 16 KBytes transfer properly, I have another 128KByte executable, it also gets corruption (its checksum changes every download).

### Reply 11 by Eugeny, 2015-05-17

By the way, looking to Wireshark I see line:
16 3.641003000 192.168.1.40 192.168.1.35 TCP 60 aibkup > http [RST] Seq=3556851805 Win=0 Len=0
where 40 is W5100 machine and 35 is local web server. It says that W5100 breaks TCP protocol…

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/e419313ec9dc7e4dfc4de1d889ba19990fdcbdd3.png) 1280×770 51.8 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/e419313ec9dc7e4dfc4de1d889ba19990fdcbdd3.png)

### Reply 12 by Eugeny, 2015-05-18

I was tracing my algorithm in hope to find out that data corruption occurs on some “edge” of the packet or data transfer… no way. It happens inside transfer, in the middle of the packet. E.g. location 0B163h is somewhere between boundaries of transfer 0B000 and 0B680, not at its edge or any of its “remarkable” locations.

`0000B163: FF 24 0001C063: FF 00 0001D462: FF C0`

### Reply 13 by Eugeny, 2015-05-18

I changed W5100 memory allocation from 0AAh (4K buffers for sockets 0 and 1) to standard 055h (2K for all four sockets) - no luck, same corruption.

`0000B863: 9B 09 0000C467: BF 90 0000C663: BF 0D 00015F61: FF 01`
As you can see same xx6x addresses

### Reply 14 by Eugeny, 2015-05-18

I filed complaint with Korean Trade commission in the category “Unfair Trade”.

### Reply 15 by Eugeny, 2015-05-18

Major distributors were sent the following notice:
“There’s problem with WIZnet products, please be careful as you may start getting returns. See here: [Wiznet please reply: Data corruption](https://forum.wiznet.io/t/wiznet-please-reply-data-corruption/1736/1). Good luck with your sales.”

[size=200]Wiznet - any reaction? Do not know what to do? Support me please to prove that your product is behaving properly. If the problem is caused by my mistake, I will happily apologize and revoke my claims. But time works against you, not against me.[/size]

### Reply 16 by hjjeon0608, 2015-05-18

Hi, Eugeny

I want to review your code if you don’t mind.
I think it is best way to reduce debug time.

Thanks.
Tony.

### Reply 17 by hjjeon0608, 2015-05-19

And we recommend termination resistor as 49.9 ohm but 51 ohm maybe work correctly.

Refer to [Ethernet termination resistor](https://forum.wiznet.io/t/ethernet-termination-resistor/613/1)

### Reply 18 by Eugeny, 2015-05-19

Tony, thank you. Jack was replaced with J1011P21, and resistors were replaced with 49.9 1%. Chip was replaced one time. Same corruption result, thus it should not be related to single-defective-chip, to jack or to resistors. There should be something else. I sent you email with all the details. Please refer here for corruption sample data. It should be easy for you to check hardware design, please contact me when you will be reviewing software design.

### Reply 19 by jeongsk, 2015-05-19

Hi Eugeny.

You seem a circuit without a problem. But there is a problem in your Artwork.

The TX +/- and RX +/- signals are high-frequency signals of 100MHz.

But you had to design without considering at all. The timing of signal is wrong.

1. Make Remove the test pad the TX +/- and RX +/- signal.

2. The TX + and TX- are the same length, side by side Make connections. (Also RX +/-)

3. Change the position of the matching resistor.
  - Your designs: W5100 — RJ45 — matching resistance (X)
  - The right design: W5100 — matching resistor — RJ45 (O)

4. Do not use the array resistance on matching resistor.

5. RJ45 underneath do not place. - parts, GND, signal.

6. Make the GND of the RJ45 and digital GND isolation.

7. Make use of 49.9 ohms.

Thak you.

Scott.

### Reply 20 by Eugeny, 2015-05-19

![](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/48.png) jeongsk:

> 1. Make Remove the test pad the TX +/- and RX +/- signal.

These holes are to be used to solder board with another RJ-45 connector. This soldered board will have different level. See attached picture. The reason for this design is that cartridge board is to be installed into is 12mm thick - with ±5 cm from each side of board, but I was unable to find cutout RJ-45 with or without magnetics to have its contacts on the board and the center of its body at the level of the board. Can you advise any appropriate RJ-45 (for “board-dimensions” layout)?

![](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/48.png) jeongsk:

> 2. The TX + and TX- are the same length, side by side Make connections. (Also RX +/-)

For this I need to rotate chip 90 degrees clockwise and move it left bottom just below the connector. In next revisions I will see if I can do it. But again, it all depends on the RJ-45 connector I will use. As I explained above, from design perspective I chosen to use two leveled boards. Of course it is not the best solution from circuitry point of view. So I will be very glad if you can advise connector which can be put onto the board as shown on the picture. For this two-board design (“board-dimensions-two-boards”) I ordered 7498011122R (<http://katalog.we-online.de/pbs/datasheet/7498011122R.pdf>), and it sill requires two boards, even if it is slimmest I was able to find.

[quote=“jeongsk”]3. Change the position of the matching resistor.
- Your designs: W5100 — RJ45 — matching resistance (X)
- The right design: W5100 — matching resistor — RJ45 (O)[/quote]
This is clear. The only issue that I have scarce space on the way to RJ45 connector, and if there will be two boards, space will be even less. Task for next revision of the board.

![](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/48.png) jeongsk:

> 4. Do not use the array resistance on matching resistor.

Clear, given that I was not able to find such from Burns. I use 4 * 0603 1% 49.9 Ohm resistors (RC0603FR-0749R9).

![](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/48.png) jeongsk:

> 5. RJ45 underneath do not place. - parts, GND, signal.

Clear, but constrained by the space of the board. I will see what I can do in next revision.

![](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/48.png) jeongsk:

> 6. Make the GND of the RJ45 and digital GND isolation.

I do not understand. How can I isolate them if they are the same ground?

![](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/48.png) jeongsk:

> 7. Make use of 49.9 ohms.

Already done.
![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/e3931a617187302ae9c2adb6a2b635d421fff5c8.gif)

![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/b235d97f474a264dc339ad1d87ab94f4248e9a08.gif)

![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/575ea8c6672a3605e695f9144f6df97f7bd7799b.jpg)

### Reply 21 by hjjeon0608, 2015-05-20

Hi,

[code]/* get size of data in RX buffer */
size=(int)peek(WSOCK1+WS_RXRSR);
size=(size&lt;&lt;8)+(int)peek(WSOCK1+WS_RXRSR+1);

```
	if(size)
	{
		/* read data of size is !=0 */
		/* calculate initial read position */
		offs=(int)peek(WSOCK1+WS_RXRD);
		offs=(offs<<8)+(int)peek(WSOCK1+WS_RXRD+1); //offs is src
		offs&=WM_SOCK;  //M_SOCK	0x07ff
		start=WS1BASE+offs;

		/* set RX buffers page */
		setWpage(3);

		/* flush data to RAM */
		if(offs+size>WM_SOCK+1)
		{
			upper=WM_SOCK+1-offs;
			movmem(start,RAMBUF,upper);
			movmem(WS1BASE,RAMBUF+upper,size-upper);
		}
		else	movmem(start,RAMBUF,size);[/code]
```

This code is correct. But I worry about pointer operation.
I recommend to use array or buffer for RX data and test one more.

And hardware issue is the point of data corruption so, I think debug the hardware and then code debug is second.

Thanks.
Tony.

### Reply 22 by Eugeny, 2015-05-20

[quote=“hjjeon0608”]This code is correct. But I worry about pointer operation.
I recommend to use array or buffer for RX data and test one more.[/quote]

Which exactly line of code is under suspicion? You did not post it here, but in this test code I calculate checksum using data in RX buffer when copying to RAM. There’s no data sliding, no totally wrong data. Only two bytes out of 131072 bytes. If pointer operation would be wrong (given the read look takes place at least 64 times (131072 [size of file]/2048 [size of RX buffer]), there should have been much more corruption that 2 bytes.

hjjeon0608:

> And hardware issue is the point of data corruption so, I think debug the hardware and then code debug is second.

At this point I can not do much on it. I tried 10Mbit half duplex (which is 10 MHz differential signal in contrast wit 100MBit which was said to be 100 MHz signal) with same corruption issue - and concluded that it is not physical problem, it is logical problem.

Also need to remind that before manufacturing I was trying to get advice from Wiznet contacting Joachim Wuelbeck directly asking about jack, without any response. So now we have what we have, I can not make major changes to board without re-manufacture and re-assembly.

At this point, if you believe that code is correct and circuit diagram is correct, it is good time for you to see if you can reproduce the issue. Conditions are the following:

- parallel access to the chip;

- 5V control signals, 3v3 data signals;

- CPU read/write cycle is about 1.2us, with /WR and /RD active for about 800ns.

- my test data I supplied to you for download - either from your webserver, or you can use my gr8bit webserver.

Please let me know which other data you need to continue troubleshooting at your side. And please tell me what exactly I can do to further troubleshoot issue without re-manufacture. I will see if I can change the design and remake the board, but it will cost money and time, and if result will be the same it will be the different story.

### Reply 23 by Eugeny, 2015-05-20

Regarding Jeongsk’s points regarding hardware design. I look into the design of Arduino shield v.06, and see that:

1. it uses resistor pack on the TX and RX lines;

2. resistor pack is located on the TX/RX path after RJ-45;

3. difference in TX/RX conductors lengths do not (much) differ with my board, and between + and - differential lines lengths;

4. RJ45 connector is not shielded by GND on the board at all.

This is NOT to say that Arduino has “good” or “right” hardware design. The point is that it was reported to work without data corruption. Mine, with similar properties, except some major differences, does not.

### Reply 24 by jeongsk, 2015-05-21

Hi.

You do want to use an RJ45 at the other boards?

You should not use it. TX +/- and RX +/- This connection should be above board.

We can not be responsible for your bad design.

If your board is lucky, the possibility to work well.But likely it will not operate.

Do you think you’re the Arduino v.06 comment right way?

We are Chip vendor. Please follow me to our guide.

Related information, please refer to the URL below.

[url][http://wiznethome.cafe24.com/wp-content/uploads/wiznethome/Chip/W5100/Hardware/w5100_hardware.zip\[/url\]](http://wiznethome.cafe24.com/wp-content/uploads/wiznethome/Chip/W5100/Hardware/w5100_hardware.zip%5B/url%5D)

### Reply 25 by Eugeny, 2015-05-21

![](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/48.png) jeongsk:

> You should not use it. TX +/- and RX +/- This connection should be above board.

Do you have any suggestion for RJ-45 to positions as I need?

![](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/48.png) jeongsk:

> We can not be responsible for your bad design.

But it still to be proven that I currently have bad design. Please do not be tempted taking the position that “customer of fool and he is guilty”. It will give you fallacious sense of security, but will eventually kill your business.

![](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/48.png) jeongsk:

> If your board is lucky, the possibility to work well.But likely it will not operate.

I wrote server part application for the device, and it works well. So far transfer from W5100 to my PC works for 20 minutes, downloading this 128KB image under question in loop. It equals 30Mbytes of data transferred without corruption from W5100 to the internet. I feel lucky. But it has nothing to do with luck.

![](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/48.png) jeongsk:

> Do you think you’re the Arduino v.06 comment right way?

Yes, see attached. Here’s explanation:
position 1: resistor pack is used, and you can clearly see it is located after RJ45.
position 2: TX and RX signals are close to each other.
position 3: TX and RX signals are close to power rails.
position 4: power filtering ferrite beads/coils and power supply circuits are too far away from the source and destination of the power.
Do you agree with my conclusions?

![](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/48.png) jeongsk:

> We are Chip vendor. Please follow me to our guide.

As I said this position will not help you. If you can not give proper guidelines of how your chip should be properly used, and will not support people who have it not working, you will be guilty for no overall result. I still claim that your chip has corruption problem with receiving data. hjjeon0608 confirmed that algorithm is ok. There’s no problem in circuit design. My current board hardware design is not much different than Arduino which is claimed to be working properly.
I insist you manufacture replica of my device and troubleshoot it, and prove that in your device receiving works without corrupts, or you will troubleshoot remotely with me and we will find the cause for corruption in my device here. Until issue is cleared, you are vendor of bad chip.

[quote=“jeongsk”]Related information, please refer to the URL below.
<http://wiznethome.cafe24.com/wp-content/uploads/wiznethome/Chip/W5100/Hardware/w5100_hardware.zip>[/quote]
Let’s look into this document:

1. page 3, figure 1. You have isolation area between RJ-45 chassis and signal ground. I am sorry, if something is not connected to signal called GND you can not call it GND. So “chassis GND” is wrong term which is misleading for developers - is it GND, and if it is not GND, why it is not connected to signa ground?

2. page 3, figure 1. It would be great if you give example of board design for resistors and capacitors of TX/RX lines. It is NOT POSSIBLE to design board for such circuit without either having vias or having resistors and cap between + and - lines. Thus by default it is NOT POSSIBLE to meat all your requirements.

3. page 3: “The traces should not be too long and 12cm will be the maximum of path’s length” - do you think TX/RX on my board look like comparable to 12 cm length?

4. page 3: “Besides, the distance between RJ-45 and magnetic should be as short as possible” - is RJ-45 connector built-in magnetics considered to have short distance?

5. page 3: “It is better that do not try to partition GND at all” - what does it mean? Not clear. Your engineers are very experienced and clever for sure, but if Wiznet will not communicate this cleverness to others so that others understand, the cleverness will be useless.

6. page 3: “No power and GND planes can be underneath the isolated area for the RJ-45 connector and magnetic”, but at the same time you call signal connected to RJ-45 chassis" GND. You contradict yourself.

7. page 3: “Also RJ-45 connector has its isolated GND (Chassis GND) to connect to RJ-45’s case” can you explain what term “isolated GND” means? Can GROUND be isolated? There’s signal ground, there’s protective ground, but “isolated ground” is something new in electronics. It is clear that we talk about words, but you deliver your content and guidelines with your words, and they are misleading.

8. page 4: “Avoid signal noise or loss on these traces” - can you tell how can developers do it? They will be watching signals passing and if the are lost developers by hand return them back to traces? This is not practical guideline.

9. page 4: “D: Line width is as wide as possible in the range of (6mil ~ 12 mil), ex: 8mil” - there could be an issue with it. Package of the W5100 chip assumes pads of 10 mil width. Larger pads = risk or shortage. Thus 12 mil sounds bad advise. BTW, in my design I have 10 mil traces.

10. page 4: “L: Width between differential pair should be small, ex: 4mil” - “ex” means “for example”, so what is within specifications? 10 mil is withit specifications? 10 mil? Look up at point 2 where I say that you can not place resistors are you guide (on the pack to magnetics without vias) without having these resistors between differential lines. That’s why Arduino is having resistor pack after magnetics.

11. page 4: “W: Isolation width between TX+/- and RX+/- is as wide as possible, ex: 30mil”, again “for example” is wrong approach. It should say what is within specifications. BTW, 30 mil is minimum which ca be achieved for simple reason - RXIN and TXOP pins of the package have this clearance (with 1V8A pint in between).

12. page 5: “Try to avoid via for TX+/-, RX+/- traces. Via will degrade signal quality” - provide sample acceptable board layout. According to your requirements, Arduino’s hardware board design is NOT acceptable.

13. page 5: “Try to keep the distance between Tx+/- & Rx+/- differential pairs for good isolation. When these two pair of traces run together in parallel, don’t place them too close for unwanted interference” - see point 11. They, at the chip package, have distance of 30 mil. Look at Arduino - TX/RX go in parallel. Would you say they have “bad” design? Seems so you do.

14. page 5: “The signal trace length difference between Tx+ and Tx- (Same as Rx+ and Rx-) should be kept as small as possible, better within 1 inch” - do you think in my design length of the traces differ for more than one inch? Where do you see it?

[size=150]So why you tell me that I have bad hardware/board design?[/size]
I think I shown that your guidelines are not “quantifiable” and sometimes contradict each other. This document I reviewed above can increase “quality” of device, but you will not be able to unambiguously prove that some design is bad using it.

[size=150]So at this stage of troubleshooting of my device I state the following:[/size]

1. my circuit diagram is correct, confirmed by hjjeon0608;

2. my hardware/board design is not bad, and is comparable to the board design of Arduino.

3. W5100 sends data without corruption, but it receives data with corruption. You have my circuit diagram, signal timing and software, and can reproduce the issue.

Please be constructive. I want to resolve issue and make my device working properly as much as you want your brand and sales to be healthy.

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/50f9d380287a44d9d77b4d70278ea47db0358a9b.gif) 862×607 54.7 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/50f9d380287a44d9d77b4d70278ea47db0358a9b.gif)

### Reply 26 by Eugeny, 2015-05-21

To understand if RX + and - lines being separated by the 3V3A via in my design may have influence on data quality, I decided to make modifications to the lower RX- line. I cut the track and soldered airwire just above the RX+ track. See attached. I still have receive corruption issue, and W5100 became less stable. Sending data still works fine.
*Note: jack installed is J1011P21 (not the one written on the board).

`Comparing files x.txt and VKILLER.ROM 00001D67: 00 FF 0000B161: 24 FF 0000B163: F0 FF 0000B863: 09 9B 0000C263: F1 FF 00018C67: 02 7F 00019466: 9A 7F 0001A962: 01 FF 0001D462: A8 FF`
Left is received, right is original. Again, FFs become some garbage in xx6x addressing space…

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/b618c2ac055d011ceb6843159481ec201d73772a.jpg) 945×672 283 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/b618c2ac055d011ceb6843159481ec201d73772a.jpg)

![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/1563e225595247732c41cca803cfbd49a598ffa2.png)

### Reply 27 by Eugeny, 2015-05-21

Still experiencing issues on test data. Issue is intermittent. Below you see 8 corrupt bytes. Sometimes they are only four, line in second sample.

`00004062: C2 BF 00006263: B0 FF 0000C263: FB FF 0000ED64: C0 FF 00012263: FB FF 00014263: FB FF 00016263: FB FF 0001E263: AF FF`

`00006062: C2 BF 0000A263: AF FF 0000E263: FB FF 00016263: BB FF`
What is so magic about this address xx63???

I was checking if these erroneous bytes can come from data W5100 received before. There is a pattern, but it is again not fixed. For example, byte which W5100 gives could be 256 or 1024 bytes back from the location being read.

There’s data which is received properly - even of 128KB size, but I have samples which do not.
When I touch 18pF capacitor connected to XTLN (pin 75) and ground all LEDs go off (W5100 stops operating). I would assume this part of circuit is sensitive to the external influence, but not to that extent?

Edit: I want to stress again - W5100 sends data properly - even test data which it fails to receive without corruption.

### Reply 28 by Eugeny, 2015-05-22

I made a video on the subject: [url][Data corruption with WIZnet W5100 (solved) - YouTube](https://youtu.be/D6RscaazLis%5B/url%5D)

Dear WIZnet, I wait for your cooperation. I will not stop until issue is resolved, because it blocks my project. I will not release device which is defective because I will have to support it, and I value my reputation as designer and developer.
Thank you.

### Reply 29 by hjjeon0608, 2015-05-28

I recommend to redesign your PCB by our guide line.
You think your design doesn’t have any problem but we think your design have a problem.

We try to solve your problem but you claim your opinion only.

### Reply 30 by Eugeny, 2015-06-05

hjjeon0608:

> I recommend to redesign your PCB by our guide line.

It will cost some money and time. If design using your guidelines - and if these guidelines are possible to implement - will not work, I will sue WIZnet.

hjjeon0608:

> You think your design doesn’t have any problem but we think your design have a problem.

Of course my design has problems because it does not work properly. We have already figured out (I think it is 99% proven) that problem IS NOT at the PHY side. It is in the host-interface circuitry.

hjjeon0608:

> We try to solve your problem but you claim your opinion only.

So what is your opinion? That customer is an idiot? What is your opinion about board design of Arduino Ethernet Shield?

I am looking to this document: <http://www.intel.com/content/www/us/en/embedded/products/networking/82545em-82545gm-82546eb-82546gb-gbe-controllers-design-guide.html>. It is Intel Gigabit Ethernet controller. I recommend you looking into it and follow its format and language. It has application description of each element connected to the ship, and sample circuit diagram with explanations, and even some electric theory why somesthing should be done they way it is said to.

Let’s look at the board (needless to say these boards sell more than your chips alltogether, and cost hundreds times more).

- Distance between interface controller and magnetics is 5 cm, in total between chip and RJ-45 connector 8 cm. Datasheet says maximum 4 inches = 10 cm. And it still works- and sells! (my board has ~2 cm track lengths).

- RX/TX signals use vias - 3 for each track (BGA ball, 49.9 termination resistor, and near magnetics) - and it still works - and sells!

- in your documentation there’s NO layout example how termination resistor to be implemented. Well, I looked at this Intel board, and implement the same way. Please tell me that it is wrong.

What I can tell you about design of your chips…

- all - ALL magnetics - Epcos, Halo, Pulse, Wuerth - have positive PHY line input at the left side and negative PHY line input at the right side, all - ALL your chips - W5100, W5200, W5300 - are having positive PHY line output at right side and negative PHY line output to the left, the way round. You chips are just not designed to be attached to external magnetics, and if trying attaching them I will not be able to comply with you requirements (see attached picture). Well, customer is an idiot and is having bad design, right?
  BTW, Realtek chips (e.g RTL8019AS) are having +and - channel pinouts corresponding to the magnetics pin-inputs.

I am sorry being persistent and sharp - current situation went too far, I am losing time, and we still do not have much progress. As I said in one of the emails (see attached picture) W5100, while is said to be 5V-tolerant, is having problems interfacing with 5V circuitry in dynamics. When W5100 operates, it causes serious noise and spikes on its input pins - they can be caused either by the W5100 inputs drawing current from source, or just by difference in the impedance. You documentation has no research and statistics on this matter, you just did not do such testing. BTW, I know this because I compared scope output with W5100 operating and W5100 suspended (with its input 25 MHz clock suspended). In suspended mode noise or spikes do not appear.

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/16a8b8c4115c2985352b6de06d72843928c7ddb8.png) 1004×709 49.7 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/16a8b8c4115c2985352b6de06d72843928c7ddb8.png)

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/04508160e5718e646acda79387f51c5b50e213b0.gif) 607×566 25.9 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/04508160e5718e646acda79387f51c5b50e213b0.gif)

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/d2d77d2fce839133a98908d68897b2a206163082.jpg) 2592×1944 1.46 MB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/d2d77d2fce839133a98908d68897b2a206163082.jpg)

### Reply 31 by Eugeny, 2015-06-06

Here’s new design, please review and approve. If you need more information please ask me for it.
Design is still missing RJ-45 connector.

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/b6fe59655ba790e3acb02cffa2c10392aa36fc74.png) 1238×640 170 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/b6fe59655ba790e3acb02cffa2c10392aa36fc74.png)

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/57f0ce31f0c1da96cbe6a736d7677bb3f76b6b3a.png) 1238×640 135 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/57f0ce31f0c1da96cbe6a736d7677bb3f76b6b3a.png)

### Reply 32 by Eugeny, 2015-07-01

Update: I am working with WIZnet to make new design in 3v3 environment. It appeared that my original design was not so bad as one may think, but it could have been better. We have found the way making W5100 working properly in it by changing timing of the control signals, in particular delaying /RD signal deactivation.

### Reply 33 by Eugeny, 2015-09-01

Update: [url][GR8NET playing wave file from internet and acts as SCC - YouTube](https://www.youtube.com/watch?v=BsEx56HTo_A%5B/url%5D). W5100 works. I also found out that original control signals I was feeding to the CPLD and W5100 were noisy up to malfunction of the high-speed logic (this should have also played a role in W5100-related issues). Seems W5100 does not have much logic to fight against it. I had to implement sophisticated circuitry in FPGA to remove the noise (as I did not find decent hardware solution to it - pullups, pulldowns, RC filter).

### Reply 34 by Eugeny, 2015-10-02

Just purchased, there will be 15 boards in the batch ![:smiley:](https://emoji.discourse-cdn.com/twitter/smiley.png?v=12)

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/35430901db10a6a5371c40b81899ad849f6e3d56.jpg) 840×318 54.3 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/35430901db10a6a5371c40b81899ad849f6e3d56.jpg)

Photo of the prototype based on W5100 which works properly.

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/dd83d9a8bc237e29eb14ffe94c6eebd567451299.JPG) 800×1141 178 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/dd83d9a8bc237e29eb14ffe94c6eebd567451299.JPG)

### Reply 35 by winston, 2015-11-13

I wish I had seen this thread earlier…

I designed an add-on card using the W5100 a few years ago and had to overcome some issues to make the W5100 work with an old 8-bit system, and I think I could have helped (it was also Z80 based). Since you have your MSX cartridge working already I provide this for academic interest only:

- While the W5100 is 5v tolerant this doesn’t mean it can easily drive the long, meandering and highly loaded bus of an 8 bit computer. In particular the byte 0xFF was problematic (the Z80 would often read different values when the W5100 was trying to output 0xFF on the data bus). I solved this by putting a 74HCT245 octal transciever between the W5100 and the Z80’s data bus. (I didn’t have this problem at all with a different Z80 based single board computer, but that had a much shorter data bus with only a couple of other chips on it. The Spectrum data bus is very long and has a lot of ICs on it, and lots of parasitic capacitance and inductance)

- Early versions of the chip had a bug in their reset circuitry. I was driving reset directly from the 8 bit computer, and the reset line had a very slow rise time. There was a problem with pre-2008 (if memory serves) W5100 chips where if reset was rising at the same time as the 25MHz clock, the chip would not connect to a 100baseTX network (but would work fine with 10baseT!). Not a problem with new chips, but I changed the reset so it was generated by the CPLD instead and controllable in software from the Z80 (so software could reset the chip if the link didn’t come up).

- Auto-increment mode seemed problematic too, but in the end I memory-mapped the W5100 so I didn’t investigate the problem any further. (I made my original prototype on a hand-etched 2 layer board, and I suspect ground bounce may have been an issue since I lacked good ground and power planes).

I have found that the W5100 has been highly satisfactory and hasn’t given me any problems since then - it’s been very reliable and worked very well with all sorts of models of this particular Z80 based computer (Spectrum). A couple of hundred people are using the device without complaint.

### Reply 36 by Eugeny, 2015-11-30

Winston, thank you.

![](https://avatars.discourse-cdn.com/v4/letter/w/e8c25b/48.png) winston:

> In particular the byte 0xFF was problematic (the Z80 would often read different values when the W5100 was trying to output 0xFF on the data bus).

Did you have pull-ups on the data bus? And anyway using bi-directional buffer (as you did) or level shifter is much better solution.

![](https://avatars.discourse-cdn.com/v4/letter/w/e8c25b/48.png) winston:

> I changed the reset so it was generated by the CPLD instead and controllable in software from the Z80

Probably Schmitt trigger would be just enough ![:slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=12)

![](https://avatars.discourse-cdn.com/v4/letter/w/e8c25b/48.png) winston:

> * Auto-increment mode seemed problematic too

In your case chip select to the W5100 was noisy and most probably the read pointer (as well as write one) is incremented several times rather than once for single read or write. My design, in contrast, had no issues with indirect mode. To remove such issues I designed sophisticated circuit (in FPGA) based on the synchronizers and level watchers, and now I am 100% sure I have clean control, address and data signals on W5100.

![](https://avatars.discourse-cdn.com/v4/letter/w/e8c25b/48.png) winston:

> A couple of hundred people are using the device without complaint.

That’s great ![:slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=12)

### Reply 37 by Eugeny, 2015-12-04

Manual: [url][http://rs.gr8bit.ru/Documentation/GR8NET-manual.pdf\[/url\]](http://rs.gr8bit.ru/Documentation/GR8NET-manual.pdf%5B/url%5D)

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/ef4553c7f71570577b4e5944d7b6b81b6d38a332.jpg) 1024×415 191 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/ef4553c7f71570577b4e5944d7b6b81b6d38a332.jpg)

### Reply 38 by Eugeny, 2016-03-31

New batch! ![:sunglasses:](https://emoji.discourse-cdn.com/twitter/sunglasses.png?v=12)

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/567541031c4b6ee7e947bfba80e83df86bb66169.jpg) 763×1024 419 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/567541031c4b6ee7e947bfba80e83df86bb66169.jpg)

---

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