W5500 stuck on socket close
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: W5500 stuck on socket close
by Eugeny ·
Never tried to close socket which is already in closed state. Second suspicion is you writing and reading register data from wrong location (e.g. problems in SPI communication).
RE: RE: W5500 stuck on socket close
by gama ·
Hello Eugeny, I don’t think so, because 2 others boards with the same hardware and test code work without problems: after writing 0x10 to CR, the first reading of CR returns 0, which is correct.
RE: W5500 stuck on socket close
by Eugeny ·
Do other registers read properly? Make a reg dump to see if all the values are correct default values.
RE: W5500 stuck on socket close
by gama ·
Yes, I’ve checked most of the global and sockets registers (excluding ip addresses, ports and tx/rx pointers). They are at the default value: most of them are zero, but I can correctly read the ones which are not zero (RCR=08h, PHYCFGR=B8h, Sn_TTL=80h, Sn_RX/TXBUF_SIZE=2 …), the only difference is Sn_IMR which is 1Fh instead of FFh, but it is ok the missing bits are reserved.
RE: W5500 stuck on socket close
by Eugeny ·
Does link go up when you insert network cable connected at the other end?
RE: W5500 stuck on socket close
by gama ·
The link status is indifferent for this problem: on the working boards it works with or without link, on the stuck board it never works.
But on the stuck board the link is never up with the cable connected, also the link led is always off. Hardware-wise everything else seems ok.
RE: W5500 stuck on socket close
by Eugeny ·
If I would not think there’s a difference, I would not ask.
Not ok. Even with unconfigured W5500 (e.g. just after power up) link must be up when live cable is connected. You must check if circuitry is properly powered at the PHY side, and if there’s any connection/PCB issue.
RE: W5500 stuck on socket close
by gama ·
As I tried to explain in that line, with “indifferent” I meant that this problem doesn’t change with the link on or off, and since without link I have a chip working and one not, I can probably assume that the link detention not working is not a cause but another result of the faulty chip.
To recap, a week ago I had 3 boards working without problems, now one board is not working. Without link I can compare the boards pin to pin, the only differences are: EXRES1 pin is 0V instead of the correct 1.2V and on the TX couple I cannot see the “idle frames”, on the working one I can see them repeated every 20ms.
I’m quite sure that the problem is the W5500 chip.
I’m trying to understand what happened to this faulty chip, its situation is: CR doesn’t reset itself for any command, consumption is 20mA less than normal, but the SPI communication works correctly (and the registers read/written are correct).
It seems like the W5500’s SPI peripheral still works and can read/write the chip’s RAM, but the microprocessor in charge of everything else doesn’t work anymore.
Does anyone know in what case CR cannot reset itself? Fried microprocessor? Bad cloned chip?
RE: W5500 stuck on socket close
by Eugeny ·
Does it matter? If your goal is to solve the problem with non-working module, replace chip, but only after you ensure problem is not external to the chip.
It is not proven yet. EXTRES1 relates to analog circuit, 0V level may mean you have problem with 3V3A. Did you check it as I asked in my previous reply?
Given the price of the chip I do not think there will be clones or unauthorized copies.
RE: W5500 stuck on socket close
by gama ·
Eugeny, I don’t know what you trying to do, but nevertheless thanks for trying to help, now it’s ok.
Is there anyone from @wizteam who knows in what case CR cannot reset itself? And possibly the cause of this situation, so I can try to avoid it.
RE: W5500 stuck on socket close
by lawrence WIZnet ·
Hi @gama
Thank you for the test with W5500.
It is so interesting ethernet function test.
Actually, In Sn_CR register, 0x10 means SOCK_CLOSED.

This is defined in ioLibrary, as
#define Sn_CR_CLOSE 0x10It is so good way to use W5500 with own made driver. But if there is some problem, it could be helpful to refer the official ioLibrary:
Thank you