---
title: "W5100 Sn_TX_WR Range"
url: "https://maker.wiznet.io/forum/11487"
markdown_url: "https://maker.wiznet.io/forum/11487/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "ogawakazuhito"
created: "2015-11-30T11:29:21+09:00"
last_activity: "2017-05-04T08:37:38+09:00"
language: "en"
views: 482
replies: 2
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# W5100 Sn_TX_WR Range

## Question

Asked by ogawakazuhito on 2015-11-30 in Ethernet Chips.

Hello

Please teach me the range of each Sn_TX_WR value (TX Write Pointer).

I have set the TMSR = 0x55 (each Tx Memory Size is 2KB/0x0800).
The each TX base address and size is
S0_Tx_Base=0x4000, S0_Tx_Size=0x0800
S1_Tx_Base=0x4800, S1_Tx_Size=0x0800
S2_Tx_Base=0x5000, S2_Tx_Size=0x0800
S3_Tx_Base=0x5800, S3_Tx_Size=0x0800

I have actually tested the W5100 to check the reset location of socket-1 TX Write Pointer(S1_TX_WR).
And then I got the value of S1_TX_WR = 0xAF6E.
I do not know whether the value 0xAF6E of S1_TX_WR is very large or not.

Is the value 0xAF6E of S1_TX_WR is very large? or proper?

The reset specific location of Sn_TX_WR(TX Write Pointer) is 0x0000 in W5100 data sheet page-34.

What kind of a reson have I got the actual reset location value S1_TX_WR = 0xAF6E?
Why have not I got the reset specific location value of Sn_TX_WR 0x0000?

## Replies

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

![](https://avatars.discourse-cdn.com/v4/letter/o/5daacb/48.png) ogawakazuhito:

> Is the value 0xAF6E of S1_TX_WR is very large? or proper?

Ogawa-san, all the counters and pointers should be kept 16-bit, thus these values you see are correct ones.
But the data window access should be limited to the size of the buffer for respective socket. It is well explained in the datasheet in the “functional description” section.

![](https://avatars.discourse-cdn.com/v4/letter/o/5daacb/48.png) ogawakazuhito:

> The reset specific location of Sn_TX_WR(TX Write Pointer) is 0x0000 in W5100 data sheet page-34.

As far as I used W5100, I can confirm that - after reset this pointer is set to 0.

![](https://avatars.discourse-cdn.com/v4/letter/o/5daacb/48.png) ogawakazuhito:

> What kind of a reson have I got the actual reset location value S1_TX_WR = 0xAF6E?

This is good question, and the first issue which you need to consider is “reset” quality. Value of 55 is default for W5100, thus I propose you to perform software reset (using MR and wait until reset bit clears = reset complete) and check the WR pointer. This way you will be sure that you have 100% proper reset on the chip. In general, before using W5100 in my software after reset, I always perform software reset.

### Reply 2 by ogawakazuhito, 2015-12-01

Hello Eugeny-san

Thank you for your advices.
Your answer includes the very important information.
The W5100 sample program in japanese technical magazine “Interface Dec/2009” has the no-good C-code contents what includes the infinite increments and updating action for TX write pointer. I have been doubting this bad sample program descriptions. I have certain evidence via your proper advices.

---

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