15.4.2.7.1 Write to PHY Registers
The following describes the steps to write to a PHY register.
- Check the MIIB bit in the EMACMIIADDR register to identify if the MII interface is busy. When the MIIB bit is 0, the MII interface is available to write to the PHY registers.
- Write the data to be written to the PHY register in the EMACMIIDATA register.
- Initiate write by programming the EMACMIIADDR register fields as follows:
- PLA: Physical Layer Address of the PHY. The integrated PHY's address is 0x0. The values 0x1 to 0x1F are available for external PHYs.
- MII: Address of the PHY register to be written.
- CR: Clock Reference for the MDIO interface.
- MIIW: Write Initiation. This bit is set to 1 to indicate that a write operation is to be executed.
- MIIB: MII Busy. This bit is set to 1 to indicate that the MII is now busy with a write operation. The EMAC clears this bit when the write has been transmitted.