AM64x MCU+ SDK  08.02.00

Introduction

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...
 

Function Documentation

◆ bsp_pruss_mdio_init()

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.

Parameters
pruIcssHandlePRUSS Handle
pmdio_paramsMDIO configuration
Return values
0on success, <0 on failure

◆ bsp_pruss_mdio_phy_read()

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.

Parameters
pruIcssHandlePRUSS Handle
phyaddrSelect the PHY to read using PHY address
regoffsetRegister offset in PHY to read
regvalPointer to the variable to hold the register value read
Return values
0: Success -1 : MDIO access error

◆ bsp_pruss_mdio_phy_write()

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.

Parameters
pruIcssHandlePRUSS Handle
phyaddrSelect the PHY to read using PHY address
regoffsetRegister offset in PHY to read
regvalValue to write to the PHY register
Return values
0: Success -1 : MDIO access error

◆ bsp_pruss_mdio_phy_link_state()

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.

Parameters
pruIcssHandlePRUSS Handle
phyaddrSelect the PHY to read using PHY address
Return values
0Link Down Otherwise: Link Up