---
title: "Transmission corrupt"
url: "https://maker.wiznet.io/forum/11721"
markdown_url: "https://maker.wiznet.io/forum/11721/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "dhara5"
created: "2016-03-08T07:36:31+09:00"
last_activity: "2017-05-04T08:38:26+09:00"
language: "en"
views: 535
replies: 1
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Transmission corrupt

## Question

Asked by dhara5 on 2016-03-08 in Ethernet Chips.

hello,

I am using W5500 as TCP server.
For transmitting data from server I carry out the following steps

1. Read the Sn_TX_RD.

2. Using the values of Sn_TX_RD, I write 6 bytes of data to the TX_buffer.
   3.Then i update the value of Sn_TX_WR by adding 6 to it.

3. Then I issue the SEND command.
   5.And repeat again from the 1st step.

However I find that the data transmitted is mostly corrupt.

And if i write just 2 bytes in the Tx_Buffer and send, the data is corrupted but rarely. But this would decrease my efficiency.

Is there any solution for this ?

## Replies

### Reply 1 by Eugeny, 2016-03-10

1. read TX_FSR to see if there’s free space in the TX buffer

2. read TX_WR, and write data to the buffer using mask respective for the buffer size

3. update TX_WR with unmasked pointer (e.g. ef00 + 6 = ef06)

4. issue SEND command

5. wait until command register becomes 0 (command completed)
   6, go to step 1 if there’s still data to send

---

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