Altera_Forum
Honored Contributor
13 years agoProblem detecting PHY
Hi all,
I am coding my ethernet manually without RTOS or Nichestack on the DE4. My first step was to reset the MAC. - That can be done successfully The second step was to init the MAC.
alt_u8 i;
alt_u16 phyid1, phyid2;
/* perform scanning and get phy hardware */
for (i =0; i < 0x20; i++)
{
IOWR_ALTERA_TSEMAC_MDIO_ADDR0(TSE_MAC_BASE, i);
/* read phy address */
phyid1 = IORD_ALTERA_TSEMAC_MDIO(TSE_MAC_BASE, 0, 2);
phyid2 = IORD_ALTERA_TSEMAC_MDIO(TSE_MAC_BASE, 0, 3);
IOWR_ALTERA_AVALON_PIO_DATA(PIO_LED_BASE, 15);
if (phyid1 != phyid2){
printf ("phy found:id1 %x, id2 %x\n", phyid1, phyid2);
break;
}
}
I am unable to find the PHY. Any pointers ? Cheers