---
title: "Re-TX data on the W5500"
url: "https://maker.wiznet.io/forum/10047"
markdown_url: "https://maker.wiznet.io/forum/10047/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "JimMartz"
created: "2014-03-14T15:39:06+09:00"
last_activity: "2017-05-04T08:32:00+09:00"
language: "en"
views: 523
replies: 1
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Re-TX data on the W5500

## Question

Asked by JimMartz on 2014-03-14 in Ethernet Chips.

All,

I have been re-writeing the iolibrary_v100 for the processor I am using.
I was going through the TCPReSend function, in particular TCPReSendNB().
After some checks, it issues the SEND command in the sockets CR register.

Here is what I am wondering.
If the SEND command was already used to on the first transmit, TCPSend.
Then would not the TX_RD and TX_WR be the same value?
And if so, how does sending the SEND command again work, if the
TX_RD and TX_WR are the same value?

If one could decrease the TX_RD by the data length, then I could see
resending the SEND command work.
But the TX_RD is read only, correct?
So if it is read only, then how can data be re-transmitted without
loading the data back into the socket TX buffer first, and increasing
the TX_WR pointer?

Thanks,
Jim

## Replies

### Reply 1 by JimMartz, 2014-03-17

I think I figured it out.
The only thing in the W5500 datasheet says is
“SEND command transmits from the current Sn_TX_RD to the Sn_TX_WR”.
Well looking at the datasheet for the W5200(page 50) it looks like there is an
exception to that. If the data is longer then what is set in the MSS register,
then it only sends that length of data. In that case the Sn_TX_RD would not be
increased all the way to Sn_TX_WR and the resend fiction TCPReSend would
be the thing to use to transmit the next chunk of data.

The whole section 5 of the W5200 data sheet is missing from the W5500 manual,
I hope this gets included in the W5500 datasheet for people like me that have not
used a previous wiz chip.

Thanks,
Jim

---

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