W5100 Status Register Sn_SR unspecific value has been responsed


The unspecific value 0x1E of W5100 Status Register Sn_SR has been responsed.
What meaning is the 0x1E of Sn_SR?
The 0x1E of Sn_SR is never specified in datasheet.


Hello Kazuhito-san, it is more important what happens after you see this code.
My guess is that it is one of the codes in the list while socket is being closed.

[quote]0x18 SOCK_FIN_WAIT

It is shown in the process of connection termination. If the
termination is normally processed or Timeout interrupt is
asserted, it will be automatically changed to SOCK_CLOSED.[/quote]

Wait for some time, and you should see SOCK_CLOSED (0x00) in this register. However if 0x1E happens to be for “quite some time”, then something is going wrong. In general your question is very related to what I asked in [url]Connection termination process problem!]. I decided NOT to use interrupts, but status codes instead.

  • If status code is <0x17 or >0x1D I immediately perform CLOSE command;
  • If codes are within range 0x17…0x1D then I perform DISCON, wait until command completes, and then perform CLOSE without waiting for any packets back. When I do CLOSE command I expect that status register will become 0x00 and do not bother about its value any more.

So far it works this way.

Hello Eugeny-san

Very Thanksful for your kindness.
Your advice is very important and nice.
In the end, I have a solution for my problem by retrying reading repeatedly status register untill getting SOCK_CLOSED code(0x00).

As I mention about these in detail that
1)When W5100 is disconnecting TCP and closing socket by itself, these close procedure is performing very smoothly with a little time.
2)When the Server application is disconnecting TCP voluntarily, the disconnecting and closing procedure in W5100 is tough to complete
and is having over very long time such as about 2 ro 3 minutes, and more I am getting this undesirable code 0x1E.
3)W5100 is having some unfavorable actions such as having a long time response for reflecting its status to status register
when W5100 is exposed in noisy environments such as Relay Noise. W5100 is very poor in terms of noise tolerance compared to another IC.

Happy christmas for you

和人さん、[url][SOLVED] W5100 Sn_CR_DISCON Time]ページを見て下さい。Server modeで、DISCONの終わることが待たないかも知れません。和人さんもよいお年をおめでとうございます!