I have combed through the ESP32 and WROOM documentation and cannot find any information on the EMAC signal AC specifications such as:
- Clock-to-out timing of outputs such as transmit data TXD[0,1], TX_EN
- Input setup/hold times for input signals such as RXD[0,1], CRS_DV
- Clock spec for the ESP32 clock output on GPIO16 and GPIO17 (LAN8710AI requires < 50PPM drift and < 150ps jitter, does the ESP meet this spec?)
- Technical Reference Manual V4.0
- ESP32 Datasheet V3.1
- ESP32-WROOM-32 Datasheet V2.8
There are designs out there that seem to “work” at typical/typical/typical and yet probably don’t meet timing requirements at one or the other corner cases.
One of the most extensive EMAC forum threads is: https://www.esp32.com/viewtopic.php?f=12&t=1178
However, NEVER is there any due diligence about interface timing. People try things, get it working on one board, and then declare it working. However, at least some of these designs are going to be marginal and will FAIL in mass production. For example, Olimex has two different boards (ESP32-EVB, ESP32-GATEWAY) and both have completely different clocking. Even on the same board, the clocking changes over different versions!
The 3 main strategies seem to be:
- Use an external 50MHz clock
- Use GPIO16 as a 50MHz clock output for the PHY
- Use GPIO17 as a 50MHz clock output for the PHY (clock inverted)
For option 3 (GPIO17) this seems to be an inverted clock and yet the RMII spec requires both PHY and EMAC to be driven by the same clock phase. So how can this work across all variations of voltage, temperature, silicon process???
Could an authority from Espressif please provide the PROPER method of clocking the EMAC/PHY that meets the timing specifications across all conditions? Alternately, please provide the actual timing specification for your EMAC interface.
Thanks!