W7500P PHY Unable to Link
MCU & Boards
- W7500P
No replies yet. Be the first to reply.
Join the discussion.
MCU & Boards
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: W7500P PHY Unable to Link
by kelanucr ·
It does seem like Auto-MDIX is still functioning as I can see the TX/RX pair occasionally flip on my scope. The fault seems to occur at auto-negotiation, the default state of AN_ARBIT_STATE is 0x8 (AUTO NEGOTIATION ENABLE) and is moving to 0x0 (TRANSMIT DISABLE) then timing out after 5s which means that it is not advancing to ABILITY DETECT. and the break_link_timer is not expiring.
break_link_timer not expiring would either point to a clock issue where the timer itself is just not advancing or an external event resetting the clock, or some unrecoverable fault in the AN state machine. The clock itself is outputting at 25MHz and I assume that the Auto-MDIX timing is managed by the clock so the clock seems to be fine. I am unsure what type of external reset would be causing break_link_timer to reset.
To rule out a faulty AN state machine on the IP101G I set Auto-Negotiation Enable to 0, Speed Selection to 1, and Duplex Mode to 1. The description of Auto-Negotiation Enable says these are the only bits that need to be set for forced mode but I still did not see anything on my scope. I then tried setting FORCE_LINK_100 to 1 and still did not see anything (I also tried disabling low power mode by setting LDPS_ENABLE to 0 and NWAY_PSAVE_DIS to 1).
As a tangent, suddenly the soft reset to bring the board back to TP mode was not working, so I revisited PHY_Init() and found a working combination to bring up in TP mode.
GPIO_PinPadConfig(GPIOB, GPIO_PinSource12, GPIO_PuPd_DOWN|GPIO_InputBufferEnable|GPIO_CMOS);
GPIOB->OUTENSET = GPIO_Pin_12;
GPIO_ResetBits(GPIOB, GPIO_Pin_12);
// COL (collision detect in normal mode)/RMII (MAC interface mode on reset high for RMII 0 for MII)
// RMII is Reduced MII (uses 7 lanes instead of 16)
// This shouldn't work? It doesn't seem to matter
GPIO_PinAFConfig(GPIOB, GPIO_PinSource5, PAD_AF1);
GPIO_PinPadConfig(GPIOB, GPIO_PinSource5, GPIO_PuPd_UP|GPIO_InputBufferEnable|GPIO_CMOS);
// DUP (duplex mode)
GPIO_PinAFConfig(GPIOB, GPIO_PinSource6, PAD_AF1);
GPIO_PinPadConfig(GPIOB, GPIO_PinSource6, GPIO_PuPd_UP|GPIO_InputBufferEnable|GPIO_CMOS);
// IP101G RESET_N (active low)
GPIO_PinAFConfig(GPIOD, GPIO_PinSource6, PAD_AF1);
GPIO_PinPadConfig(GPIOD, GPIO_PinSource6, GPIO_PuPd_UP);
// for this GPIOD pin 6, keep the following sequence, set the value & set the output enable
GPIOD->OUTENSET = GPIO_Pin_6;
GPIO_ResetBits(GPIOD, GPIO_Pin_6);
ms_delay(15);
GPIO_SetBits(GPIOD, GPIO_Pin_6);
RE: W7500P PHY Unable to Link
by kelanucr ·
I have noticed I can replicate this failure mode on a working unit by modifying my link poll loop, which just calls PHY_GetLinkStatus when no link is detected, to instead first call PHY_Init(). Then after reconnecting a link partner the link fails to come up. This leads me to believe that the startup state of the IP101G is, in addition to causing it to sometimes boot in FX mode, causing the link to fail to come up.
RE: RE: W7500P PHY Unable to Link
by Grace_Koo WIZnet ·
Hi Kelanu,
Thanks for the detailed writeup and register dumps. Based on what you've shared, this looks less like an AN state-machine issue or a single bad part, and more like the IP101G strap pins not latching reliably at the rising edge of RESET_N.
The main indicator is that your three units report different PHY addresses (1, 3, 7). The address is strap-latched at reset, so identical firmware/hardware producing different addresses suggests the straps aren't settling to defined levels. The intermittent FX/TP mode and the stalled auto-negotiation likely stem from the same cause. Your poll-loop experiment fits this too — calling
PHY_Init()re-pulses RESET_N while the RMII lines are toggling, which can re-latch the straps and take down a previously-good unit.On the W7500P the PHY is in-package, so there are no external strap resistors and the strap levels depend entirely on GPIO state and reset timing. The stock library only sets pull-ups (RXDV/FX_HEN floats high → FX mode) and pulses RESET_N with no delay, which seems relevant here.
Suggestions:
PuPd_DOWN + OUTENSET + ResetBitschange is along these lines.ms_delay(15)has the same intent.PHY_Init().Hope this helps — let us know what you find.
Best regards,
RE: W7500P PHY Unable to Link
by kelanucr ·
Hi,
I have tried adjusting the strap logic, here is what I have at the moment
// initialize PHY strap pins
phy_strap.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_5 | GPIO_Pin_6;
phy_strap.GPIO_Direction = GPIO_Direction_OUT;
phy_strap.GPIO_Pad = GPIO_InputBufferEnable | GPIO_CMOS | GPIO_PuPd_DOWN;
phy_strap.GPIO_AF = PAD_AF1;
GPIO_Init(GPIOB, &phy_strap);
// initialize reset pin
phy_reset.GPIO_Pin = GPIO_Pin_6;
phy_reset.GPIO_Direction = GPIO_Direction_OUT;
phy_reset.GPIO_Pad = GPIO_PuPd_UP;
phy_reset.GPIO_AF = PAD_AF1;
GPIO_Init(GPIOD, &phy_reset);
// configure strap
GPIO_ResetBits(GPIOB, GPIO_Pin_12); // FX/TP mode
GPIO_SetBits(GPIOB, GPIO_Pin_5); // RMII mode (I also tried MII mode)
GPIO_SetBits(GPIOB, GPIO_Pin_6); // duplex
// reset sequence
GPIO_ResetBits(GPIOD, GPIO_Pin_6);
ms_delay(15);
GPIO_SetBits(GPIOD, GPIO_Pin_6);
ms_delay(15);
You mentioned RMII, but the W7500P ref manual says it uses MII; so I tried setting both. I have tried setting the restart auto negotiation bit.
RE: W7500P PHY Unable to Link
by kelanucr ·
Warming the board by about 10F from the ambient room temperature of about 70F causes all pins on the package to become shorted. I'm going to conclude that this particular unit was damaged from improper ESD protection on the board. I noticed that on the development board schematic an additional ESD protector was installed, which my board does not have.
Additionally, I believe the intermittent link state of the working boards is caused by EMI and improper decoupling after looking at the other posts on this form ie, link issues when near a servo or relay.
RE: RE: W7500P PHY Unable to Link
by Alan WIZnet ·
A higher temperature itself does not cause ESD-related issues.
If you send us the design data, we can review it.
RE: W7500P PHY Unable to Link
by kelanucr ·
I'm not able to share the full schematic files, but it is functionally identical to the reference schematic from the WizNet Github. The only difference is that the GPIO pins are fanned out to headers but these headers are currently unpopulated. I've since swapped the uC and haven't had this problem yet again.
I did notice though that on another board the PHY link would fail intermittently when attaching external devices to the headers. When attaching an external device with decoupling capacitors the inrush current caused oscillations on the primary and analog 3v3 voltage rail causing swings above 4v and below 3v. That is my new theory on what may have killed the PHY.