This example code uses M252 PSIO (Programmable Serial I/O) to emulate serial management interface (MDC/MDIO) waveform for controlling Ethernet PHY. PSIO provides an easy way to receive and transmit various serial transmissions and control the pin output high or low at a specific time and how long the voltage level should be maintained by configuring the time slot, check point and the voltage level.
The MDIO interface is implemented by two signals, including MDC and MDIO. MDIO is the bi-directional data line and MDC is clock line.
Most of the NuMicro Family does not support MDIO master interface for PHY device configuration. This example code provides the solution that can be widely used in the NuMicro Family for accessing Ethernet PHY.
This example code requires additional external hardware modules, including an Ethernet PHY. The part number of Ethernet PHY is IP101GR made by IC PLUS Corporation.
You can download the sample code at https://www.nuvoton.com/resource-download.jsp?tp_GUID=EC012024100709354694