Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

Problem 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

11 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    ok' I've checked the pins and it says unknown for the pins. But I can't change them as they are read only.

    Ok. Update. Checked the pins and there are signals going out. But I am unable to decipher the stream. What is more worrying not is that examples refuse to run in the new workspace I've created to test LWIP.

    I think I might have done something really wrong. I installed the freertos and LWIP port for 11.0 and have used the create application from template. The ethernet cable is connected and there are no errors during compile.

    It seems that the task to start the ethernet is not running. I have deliberately placed a printf for a simple message in there and it does not show. So no prizes there.

    I see so many of getting it to work....surely there must be some light ?...... Please ?