
1. extern unsigned int EthPhyMIIMAddress(void):
a. does not take parameters;
b. Should return the address the PHY responds to. Depends on
the hardware design.
Note: all PHY’s respond to address 0.
c. Can be inlined/#defined
2. extern unsigned int EthPhyMIIMClock(void):
a. does not take parameters;
b. Should return the maximum clock frequency that the PHY can
use for the MIIM transactions.
i. Most PHY’s should support 2 MHz.
ii. National DP83848C supports 25 MHz, for example.
c. Can be inlined/#defined
3. extern eEthRes EthPhyConfigureMII(eEthPhyCfgFlags cFlags):
a. This function should configure the PHY in one of MII/RMII
operation modes.
b. The relevant input flags are:
i. ETH_PHY_CFG_RMII if RMII configuration is requested
ii. ETH_PHY_CFG_MII if MII configuration is requested
c. It should return:
i. ETH_RES_OK for success
ii. An error code if the requested configuration is not
supported.
4. extern eEthRes EthPhyConfigureMdix(eEthOpenFlags oFlags):
a. The function should configure the MDIX mode for the PHY.
b. The relevant input flags are:
i. ETH_OPEN_MDIX_AUTO if auto MDIX is requested
ii. else ETH_OPEN_MDIX_NORM/ETH_OPEN_MDIX_SWAP for
normal/swap mode.
c. It should return:
i. ETH_RES_OK for success
ii. An error code if the requested mode is not supported.
Additional Notes:
1. All functions in the PHY library are defined as weak. You can
replace any of the functions with your own implementation if need
arises. The function header in the “..install
path\Microchip\Include\TCPIP-BSD\eth_phy.h” explains what
input/output and behavior the respective function should have.
2. Take a look in the “..install path\Microchip
Solutions\Microchip\TCPIP-BSD\eth_phy\nat_dp83848c.c” or
“..install path\Microchip Solutions\Microchip\TCPIP-
BSD\eth_phy\smsc_8700.c” for an implementation example. Follow
the same approach.
3. All functions needed to access the PHY MIIM registers are part of
the provided Ethernet library.