I'm having intermittent LAN8270 connectivity problems where ESP32 MAC -> LAN8720 PHY Fails.
When checking MDIO I see the read request, but no reply from LAN8720 PHY -> ESP32 MAC
When checking MDC, I see the time between each clock cycle to be 320ns = 3MHz.
The MDC Standard is minimum period 400ns or 2.5MHz
I think the MDC Period is too short (MDC frequency too high) making the LAN8270 PHY miss the read sometimes.
Checking MIICSRCLK
This field selects the APB clock frequency. It has the following two values. Other values are reserved.
• 4’b0000: The APB clock frequency is 80 MHz. The MDC clock frequency is APB_CLK/42.
• 4’b0011: The APB clock frequency is 40 MHz. The MDC clock frequency is APB_CLK/26. (R/W)
Adjusting CPU Speed between 80/160/240MHz has no effect on the MDC Speed.
WiFi/BT requires APB @ 80MHz and I have no wifi problems
Can we think of any reason why MDC period is under 400ns?
I just figured out that 80000000/3000000 = 26. Maybe MIICSRCLK is incorrectly set to /26 instead of /42.
To fix this the divider must be updated.
Might just be an old esp-idf problem:
esp_eth_smi_write() {
...
Before: REG_WRITE(EMAC_GMIIADDR_REG, 0x1 | ((reg_num & 0x1f) << 6) | ((phy_num & 0x1f) << 11) | (0x3 << 2));
After: REG_WRITE(EMAC_GMIIADDR_REG, 0x1 | ((reg_num & 0x1f) << 6) | ((phy_num & 0x1f) << 11) | (0x0 << 2));
}
EMAC MDC Speed Too High
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: Bing [Bot] and 71 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.