The XMC_ETH_PHY low level driver provides functions used by XMC_ETH_MAC.
ETH PHY status returns
Enumerator |
---|
XMC_ETH_PHY_STATUS_OK |
OK. All is well!
|
XMC_ETH_PHY_STATUS_BUSY |
Busy
|
XMC_ETH_PHY_STATUS_ERROR |
Error
|
XMC_ETH_PHY_STATUS_ERROR_DEVICE_ID |
Error in device identifier
|
XMC_ETH_PHY_STATUS_ERROR_TIMEOUT |
Time-out error
|
int32_t XMC_ETH_PHY_ExitPowerDown |
( |
XMC_ETH_MAC_t *const |
eth_mac, |
|
|
uint8_t |
phy_addr |
|
) |
| |
- Parameters
-
eth_mac | A constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address |
phy_addr | Physical address |
- Returns
- int32_t return status XMC_ETH_PHY_STATUS_t
- Description:
- Exit power down mode
- Parameters
-
eth_mac | A constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address |
phy_addr | Physical address |
- Returns
- XMC_ETH_LINK_DUPLEX_t ETH link duplex settings
- Description:
- Get link duplex settings
- The function reads the physical layer interface and returns the link duplex settings. It returns either XMC_ETH_LINK_DUPLEX_FULL or XMC_ETH_LINK_DUPLEX_HALF.
- Parameters
-
eth_mac | A constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address |
phy_addr | Physical address |
- Returns
- XMC_ETH_LINK_SPEED_t ETH link speed
- Description:
- Get link speed
- The function reads the physical layer interface and returns the link speed. It returns either XMC_ETH_LINK_SPEED_100M or XMC_ETH_LINK_SPEED_10M.
- Parameters
-
eth_mac | A constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address |
phy_addr | Physical address |
- Returns
- XMC_ETH_LINK_STATUS_t ETH link status
- Description:
- Get link status
- The function reads the physical layer interface and returns the link status. It returns either XMC_ETH_LINK_STATUS_UP or XMC_ETH_LINK_STATUS_DOWN.
- Parameters
-
eth_mac | A constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address |
phy_addr | Physical address |
config | A constant pointer to XMC_ETH_PHY_CONFIG_t, pointing to a physical layer config |
- Returns
- int32_t return status XMC_ETH_PHY_STATUS_t
- Description:
- Initialize the ETH physical layer interface
- The function sets the link speed, applies the duplex mode, sets auto-negotiation and loop-back settings.
bool XMC_ETH_PHY_IsAutonegotiationCompleted |
( |
XMC_ETH_MAC_t *const |
eth_mac, |
|
|
uint8_t |
phy_addr |
|
) |
| |
- Parameters
-
eth_mac | A constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address |
phy_addr | Physical address |
- Returns
- bool True if autonegotiation process is finished otherwise false
- Description:
- Get status of autonegotiation
int32_t XMC_ETH_PHY_PowerDown |
( |
XMC_ETH_MAC_t *const |
eth_mac, |
|
|
uint8_t |
phy_addr |
|
) |
| |
- Parameters
-
eth_mac | A constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address |
phy_addr | Physical address |
- Returns
- int32_t return status XMC_ETH_PHY_STATUS_t
- Description:
- Enter power down mode
int32_t XMC_ETH_PHY_Reset |
( |
XMC_ETH_MAC_t *const |
eth_mac, |
|
|
uint8_t |
phy_addr |
|
) |
| |
- Parameters
-
eth_mac | A constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address |
phy_addr | Physical address |
- Returns
- int32_t return status XMC_ETH_PHY_STATUS_t
- Description:
- Reset transciver