W5200 sending issue


I have one issue at my hend …
-I configure TCP protocol and everything else
-than issue OPEN socket command
at this point Sn_TX_RD gets written with some number ussualy > 1k, but the Sn_TX_WR is 0
-after issue CONNECT command Sn_TX_WR have the same value as Sn_TX_RD

is this normal ???

after that if i issue SEND command …even i do not write anything i receive >1k of data on on the server?
if i write some data to TX memory and send it, i receive this data + some garbage data from before

any idea ?

regards zorz


Sn_TX_WR is changed after the send command is successfully executed to Sn_CR.
With the SEND command of Socket n Command Register, it transmits data from the current Sn_TX_RD to the Sn_TX_WR and automatically updates after transmission is finished.
Therefore, after transmission is finished, Sn_TX_RD and Sn_TX_WR will have the same value.

thanks :slight_smile: