You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But it is not responding. MDIOs GD filed fills with 0x0000 only.
So, Are those above configurations are correct? Or any other initialization needs to be carried out before reading the IDs or model numbers?
The text was updated successfully, but these errors were encountered:
Hello,
I am trying the read the PHY ID number and model number.
Here are the commands I am passing to PHY to get the response.
id=MDIO_read(phyAddr, 0x02);
model=MDIO_read(phyAddr, 0x03);
read config -
uint16 MDIO_read(uint8_t phy_addr, uint8_t reg_addr)
{
while (0 != ETHERNET_0_MAC_MDIO_ADDRESS.bits.GB);
ETHERNET_0_MAC_MDIO_DATA.bits.RA = reg_addr ;
ETHERNET_0_MAC_MDIO_DATA.bits.GD = 0;
ETHERNET_0_MAC_MDIO_ADDRESS.bits.PA = phy_addr;
ETHERNET_0_MAC_MDIO_ADDRESS.bits.RDA = reg_addr;
ETHERNET_0_MAC_MDIO_ADDRESS.bits.PSE = 1;
ETHERNET_0_MAC_MDIO_ADDRESS.bits.BTB = 0;
ETHERNET_0_MAC_MDIO_ADDRESS.bits.NTC = 0;
ETHERNET_0_MAC_MDIO_ADDRESS.bits.CR = 0x0;
ETHERNET_0_MAC_MDIO_ADDRESS.bits.SKAP = 0;
ETHERNET_0_MAC_MDIO_ADDRESS.bits.C45E = 1;
ETHERNET_0_MAC_MDIO_ADDRESS.bits.GOC = 3;
ETHERNET_0_MAC_MDIO_ADDRESS.bits.GB = 1;
while (0 !=ETHERNET_0_MAC_MDIO_ADDRESS.bits.GB);
return (ETHERNET_0_MAC_MDIO_DATA.bits.GD);
}
But it is not responding. MDIOs GD filed fills with 0x0000 only.
So, Are those above configurations are correct? Or any other initialization needs to be carried out before reading the IDs or model numbers?
The text was updated successfully, but these errors were encountered: