S32K344 GMAC MDIO Read Failed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K344 GMAC MDIO Read Failed

Jump to solution
163 Views
harryoceana
Contributor II

我正在使用GMAC MDIO读取外部phy的寄存器,通过逻辑分析仪能够看到已经读取成功,但是Gmac_Ip_MDIORead读取的值始终为0, Base->MAC_MDIO_DATA也始终为0。应该怎么才能都回来正确的值呢?

 

uint16 rmii_sel = 0;
	uint16 phy_reg_val0, phy_reg_val1;
	uint16 phy_addr;

	Gmac_Ip_EnableMDIO(CFG_PHY_CTRL_IDX, FALSE, 160000000UL);

	/* Search for the PHY address */
	for (phy_addr = 0U; phy_addr < 32U; ++phy_addr)
	{
		Gmac_Ip_MDIORead(CFG_PHY_CTRL_IDX, 1, 2U, &phy_reg_val0, 100U);
		Gmac_Ip_MDIORead(CFG_PHY_CTRL_IDX, 1, 3U, &phy_reg_val1, 100U);

 

 

 

捕获.PNG

Labels (1)
0 Kudos
Reply
1 Solution
121 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

do you have MDIO pin properly configured as Input/output with both input and output buffer enabled?

BR, Petr

View solution in original post

0 Kudos
Reply
1 Reply
122 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

do you have MDIO pin properly configured as Input/output with both input and output buffer enabled?

BR, Petr

0 Kudos
Reply