{
  "id": "embedded/eth-phy-autonegotiation-timeout",
  "signature": "ETH: PHY autonegotiation timeout after 5000ms",
  "signature_zh": "ETH：PHY自协商超时，持续5000毫秒后失败",
  "regex": "ETH: PHY autonegotiation timeout after \\d+ms",
  "domain": "embedded",
  "category": "communication_error",
  "subcategory": null,
  "root_cause": "PHY device failed to complete autonegotiation within the configured timeout due to incompatible link partner or faulty cable.",
  "root_cause_type": "generic",
  "root_cause_zh": "PHY设备在配置的超时时间内未能完成自协商，原因可能是链路伙伴不兼容或网线故障。",
  "versions": [
    {
      "version": "STM32H7 ETH driver v2.0.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "LWIP v2.1.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "PHY LAN8742A",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "If the root cause is link partner incompatibility or cable fault, increasing timeout only delays the failure; autonegotiation will still fail.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Looping without fixing the underlying issue can cause an infinite retry loop, blocking other tasks and consuming CPU cycles.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Force the PHY to a specific speed/duplex (e.g., 100Mbps Full Duplex) using: `phy_write(PHY_CTRL_REG, MII_CR_SPEED_100 | MII_CR_FULL_DUPLEX | MII_CR_RESTART_AUTONEG)`",
      "success_rate": 0.8,
      "how": "Force the PHY to a specific speed/duplex (e.g., 100Mbps Full Duplex) using: `phy_write(PHY_CTRL_REG, MII_CR_SPEED_100 | MII_CR_FULL_DUPLEX | MII_CR_RESTART_AUTONEG)`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check and replace the Ethernet cable, then reset the PHY: `phy_reset(phy_dev); HAL_Delay(100); phy_autonegotiate(phy_dev);`",
      "success_rate": 0.7,
      "how": "Check and replace the Ethernet cable, then reset the PHY: `phy_reset(phy_dev); HAL_Delay(100); phy_autonegotiate(phy_dev);`",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Force the PHY to a specific speed/duplex (e.g., 100Mbps Full Duplex) using: `phy_write(PHY_CTRL_REG, MII_CR_SPEED_100 | MII_CR_FULL_DUPLEX | MII_CR_RESTART_AUTONEG)`",
    "Check and replace the Ethernet cable, then reset the PHY: `phy_reset(phy_dev); HAL_Delay(100); phy_autonegotiate(phy_dev);`"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.st.com/resource/en/application_note/an4606-ethernet-phy-interfacing-with-stm32-mcus-stmicroelectronics.pdf",
  "official_doc_section": null,
  "error_code": "ETH_ERR_AUTONEG_TIMEOUT",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.75,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}