![]() |
Synergy Software Package User's Manual
|
Interface between SF_EL_NX Ethernet framework and PHY driver. More...
Functions | |
| int16_t | bsp_ethernet_phy_init (uint32_t channel) |
| bsp_ethernet_phy_init - Initialize Ethernet PHY device. More... | |
| void | bsp_ethernet_phy_start_autonegotiate (uint32_t channel, uint8_t pause) |
| Sets Auto-Negotiation advertisement and starts auto-negotiation. More... | |
| int16_t | bsp_ethernet_phy_get_autonegotiate (uint32_t channel, uint16_t *p_line_speed_duplex, uint16_t *p_local_pause, uint16_t *p_partner_pause) |
| Gets capabilities of an Ethernet PHY device. More... | |
| int16_t | bsp_ethernet_phy_get_link_status (uint32_t channel) |
| bsp_ethernet_phy_get_link_status - Returns the status of the physical link. More... | |
Interface between SF_EL_NX Ethernet framework and PHY driver.
| int16_t bsp_ethernet_phy_get_autonegotiate | ( | uint32_t | channel, |
| uint16_t * | p_line_speed_duplex, | ||
| uint16_t * | p_local_pause, | ||
| uint16_t * | p_partner_pause | ||
| ) |
Gets capabilities of an Ethernet PHY device.
| [in] | channel | Ethernet channel number |
| [in] | p_line_speed_duplex | A pointer to the location of both the line speed and the duplex |
| [in] | p_local_pause | A pointer to the location to store the local pause bits |
| [in] | p_partner_pause | A pointer to the location to store the partner pause bits |
| R_PHY_OK | Got information successfully |
| R_PHY_ERROR | PHY device is yet to be initialized |
Reads the status register. Because reading the first time shows the previous state, the Link status bit should be read twice.
Checks the link status
Check the auto-negotiation status
Gets local pause capability
| int16_t bsp_ethernet_phy_get_link_status | ( | uint32_t | channel | ) |
bsp_ethernet_phy_get_link_status - Returns the status of the physical link.
| [in] | channel | Ethernet channel number |
| R_PHY_OK | PHY device is initialized successfully |
| R_PHY_ERROR | PHY device is not initialized successfully |
| int16_t bsp_ethernet_phy_init | ( | uint32_t | channel | ) |
bsp_ethernet_phy_init - Initialize Ethernet PHY device.
| [in] | channel | Ethernet channel number |
| R_PHY_OK | PHY device is initialized successfully |
| R_PHY_ERROR | PHY device is not initialized successfully or Validation of PHY chip fails. |
Read the PHY Identifier register and compare read value with the PHY chip OUI identifier number
Resets PHY device
Waits the reset completion, PHY_CONTROL_RESET bit is self-cleared after 1 is written to it.
When MICREL_KSZ8091RNB of the Micrel, Inc. is used, the pin that outputs the state of LINK is used combinedly with ACTIVITY in default. The setting of the pin is changed so that only the state of LINK is output. Set Clock Mode to 50MHz
Sets Duplex Mode as Full-duplex
| void bsp_ethernet_phy_start_autonegotiate | ( | uint32_t | channel, |
| uint8_t | pause | ||
| ) |
Sets Auto-Negotiation advertisement and starts auto-negotiation.
| [in] | channel | Ethernet channel number |
| [in] | pause | Using state of pause frames |