Functions | |
int16_t | bsp_pruss_mdio_init (PRUICSS_Handle pruIcssHandle, t_mdio_params *pmdio_params) |
Initializes PRU-ICSS MDIO for EtherCAT firmware to communicate with PHYs. Must be called after powering on PRU-ICSS domain and before PRU firmware is loaded and executed on both PRUs. This is called from bsp_init. More... | |
int16_t | bsp_pruss_mdio_phy_read (PRUICSS_Handle pruIcssHandle, uint8_t phyaddr, uint8_t regoffset, uint16_t *regval) |
API to read PHY register via PRU-ICSS MDIO. More... | |
int16_t | bsp_pruss_mdio_phy_write (PRUICSS_Handle pruIcssHandle, uint8_t phyaddr, uint8_t regoffset, uint16_t regval) |
API to write PHY register via PRU-ICSS MDIO. More... | |
uint32_t | bsp_pruss_mdio_phy_link_state (PRUICSS_Handle pruIcssHandle, uint8_t phyaddr) |
Get the link status for selected PHY, this API considers MII_link signal polarity differences and recommended when TIESC_MDIO_RX_LINK_ENABLE is enabled for enhanced link detection. More... | |
int16_t bsp_pruss_mdio_init | ( | PRUICSS_Handle | pruIcssHandle, |
t_mdio_params * | pmdio_params | ||
) |
Initializes PRU-ICSS MDIO for EtherCAT firmware to communicate with PHYs. Must be called after powering on PRU-ICSS domain and before PRU firmware is loaded and executed on both PRUs. This is called from bsp_init.
pruIcssHandle | PRUSS Handle |
pmdio_params | MDIO configuration |
0 | on success, <0 on failure |
int16_t bsp_pruss_mdio_phy_read | ( | PRUICSS_Handle | pruIcssHandle, |
uint8_t | phyaddr, | ||
uint8_t | regoffset, | ||
uint16_t * | regval | ||
) |
API to read PHY register via PRU-ICSS MDIO.
pruIcssHandle | PRUSS Handle |
phyaddr | Select the PHY to read using PHY address |
regoffset | Register offset in PHY to read |
regval | Pointer to the variable to hold the register value read |
0 | : Success -1 : MDIO access error |
int16_t bsp_pruss_mdio_phy_write | ( | PRUICSS_Handle | pruIcssHandle, |
uint8_t | phyaddr, | ||
uint8_t | regoffset, | ||
uint16_t | regval | ||
) |
API to write PHY register via PRU-ICSS MDIO.
pruIcssHandle | PRUSS Handle |
phyaddr | Select the PHY to read using PHY address |
regoffset | Register offset in PHY to read |
regval | Value to write to the PHY register |
0 | : Success -1 : MDIO access error |
uint32_t bsp_pruss_mdio_phy_link_state | ( | PRUICSS_Handle | pruIcssHandle, |
uint8_t | phyaddr | ||
) |
Get the link status for selected PHY, this API considers MII_link signal polarity differences and recommended when TIESC_MDIO_RX_LINK_ENABLE is enabled for enhanced link detection.
pruIcssHandle | PRUSS Handle |
phyaddr | Select the PHY to read using PHY address |
0 | Link Down Otherwise: Link Up |