WIZnet Developer Forum

TCP client problems.

Hello. I am using the Wiznet W5500 and I run into a problem with the component.

In my Set-Up process:

  1. I configure the Wiznet as a TCP client

  2. I am connected directly to the server (peer to peer)

  3. I configure Keep Alive Auto for 5 sec

  4. I send messages about once a second for now.

The problem I see:

  1. After a few seconds of work, the client sends a RESET request and closes the socket (pic1.PNG), what can cause wiznet to close the socket?

  2. when I Debug and read the status of Wiznet register (Sn_SR) I get statuses that have no detail on data pages like 0x03 and 0x0b. What do these statuses mean?

  3. when I read the wiznet IP address register (SIPR) I get zeros, which means somewhere along the way, the register is reset even though I didn’t reset/write to it. What can cause the IP to reset (except for reset)?

Most probably the client sends RST because its socket is closed when it receives TCP packet.

Seems you did not get any material answer on your last topic; you must provide more information to get through. What do all the common registers have in them, and this socket registers when SR is read as 0x03? We are looking for the register value corruption now. This hypothesis partially confirms RST message as something wrong happens with socket in overall (or with chip configuration at all), and it must be verified.

So we have confirmation what there’s misconfiguration of the chip. This condition can happen in the following cases:

  1. you performed hardware reset using reset pin;
  2. you performed sofmware reset writing 1 to bit 7 of MR;
  3. you overwritten SIPR register with zeros;
  4. oscillator stopped to function (not in your case because PHY side is still functional);
  5. you just did something wrong to the chip’s configuration making it going crazy.

In the current situation the best way is to check if you use correct registers to write to, do not confuse pointers with values, and perform logging of every register write so that write sequence can be analyzed.

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