WIZnet Developer Forum

Write pointer register increasing after first read without sending anything

I am observing something strange, when I first read Sn_TX_WR it reads 0, but then if I wait 1s and read it again it throws a random number like 24578, 45171.
The device isn’t sending anything and no commands are written to it.
I tested a litte bit more and when doing 50ms pause between the reads the value increases after 4 read, so that happens after about 200ms.
Here is log generated by my device:

[2.34] {3} eth_channel_write: free: 2048, nr: 3
[2.34] {3} eth_channel_write: start: 0, nr: 3
[2.40] {3} eth_channel_write: start: 0, nr: 3
[2.46] {3} eth_channel_write: start: 0, nr: 3
[2.52] {3} eth_channel_write: start: 0, nr: 3
[2.58] {3} eth_channel_write: start: 10841, nr: 3
[2.64] {3} eth_channel_write: start: 10841, nr: 3
[2.70] {3} eth_channel_write: start: 10841, nr: 3
[2.76] {3} eth_channel_write: start: 10841, nr: 3
[2.82] {3} eth_channel_write: start: 10841, nr: 3
[2.88] {3} eth_channel_write: start: 10841, nr: 3

In [ ] is the system uptime in sec. start is the Sn_TX_WR and nr is the socket number. Why does that happening? Should it stay at 0 when not sending anything?

This is normal. Sn_TX_WR register is set to RANDOM value after INIT. When data is transmitted, this value is increased by the transmitted size.

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.