Manual Link Speed: wrong duplex mode, long establishment
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: Manual Link Speed: wrong duplex mode, long establishment
by henry ·
If I set the switch to force 10M Full Duplex, and the W5500 to auto-negotiate, then:
RE: RE: Manual Link Speed: wrong duplex mode, long establishment
by henry ·
I have a different board where PMODE is set as follows:
PMODE0 is connected to 3V3 and
PMODE1/PMODE2 are connected to GND
(10M Full Duplex)
Interestingly this board, most of the time, starts up quickly (<5 seconds).
It shows a 10M Full Duplex connection (PHYCFGR = 189) while the switch is displaying a 10M Half Duplex connection.
So it seems that when link speed settings are done by PMODE hardware pins (only), this lag and the communication errors are not there. But when done by software, there is a big lag.
P.S.: Sometimes the RxBadPkt count goes up on the switch.
RE: Manual Link Speed: wrong duplex mode, long establishment
by Eugeny ·
First, you assume that switch you use is innocent and can’t bring problems. This may not hold true. Under Windows or Linux you may not notice such problems because they hide what they do under the hood, and we may not know what they actually do to remedy situation. Contrary, W5x00 are simple and will do most things you ask them to do.
Second, I would suggest disable PHY, set necessary flags, and then reenable PHY as a test, ensuring delay (e.g. 1 second) for every stage. This will physically show the switch/router the disconnect of the endpoint and may alter its behavior.
Third, replace the cable, try different switch’s port and try different switch to get more insight into what may be possible within your setup. And yes, bad cables sometimes may give very strange problems.
RE: Manual Link Speed: wrong duplex mode, long establishment
by henry ·
Trying to force 10M Full Duplex from the W5500’s side, I tried
The result is always the same: that the Router/Switch shows 10M Half, the W5500 shows 10M Full Duplex.
The only thing I haven’t tried from your suggestions, is to disable the PHY, configure it, and reenable it again. I will try that too, although I do not think it will fix the issue, because as I mentioned I have a device with PMODE pins set, where I don’t even alter the PHY configuration. Even that device shows the same behaviour: mismatch on duplex mode.
RE: Manual Link Speed: wrong duplex mode, long establishment
by Eugeny ·
Another test: connect W5500 to the PC, connect PC with its another port (e.g. WiFi) to router, set PC into bridge mode (so that W5500 can see the router), and see that is going on the network using PC as well as properties of the connection.
What module do you use, is there a circuit diagram/board layout?
RE: Manual Link Speed: wrong duplex mode, long establishment
by henry ·
It’s a custom board.
The dampening resistors are 3 Ohms, not 3.3 as in the circuit diagram.
Yesterday I was able to get rid of the time lag problem at startup, the sequence used is basically:
But it does not fix the duplex mismatch issue.
RE: Manual Link Speed: wrong duplex mode, long establishment
by Eugeny ·
Good.
3 Ohm resistors must not make any difference. Anyway you can always replace then with jumpers.
Do not forget about proper hardware reset timing and software reset handling.
In your workflow not sure what steps 4-7 are for. 1-3 should be enough?
RE: Manual Link Speed: wrong duplex mode, long establishment
by henry ·
If I do not power down PHY, there is a big time lag.
And the Wiznet library is written in such a way, that powerdown checks first if PHY link speed is set by software…so I first need to set linkspeed, even if I plan to power down after that…
I shortened it a bit now by not using the library function for powering down PHY.
But all of this does not fix duplex mismatch. Regardless of what I do there is always a mismatch in the duplex setting.
RE: Manual Link Speed: wrong duplex mode, long establishment
by henry ·
I have an answer to the observed duplex mismatch behaviour now.
https://learningnetwork.cisco.com/s/question/0D53i00000Kt1NKCAZ/duplex-mismatch
So basically: when auto negotiation is turned off (which you must do with W5500 to force 10M), then the switch will always fall back to Half Duplex.
Also described in Autonegotiation – Wikipedia
Also described here: PHY Link Configuration
So what’s the solution?