Skip to main content
Visitor II
October 4, 2007
Question

Library Ethernet code

  • October 4, 2007
  • 2 replies
  • 787 views
Posted on October 04, 2007 at 09:28

Library Ethernet code

    This topic has been closed for replies.

    2 replies

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:39

    Hi everyone.this is the part code of the ENET_Init(u32 operatingmode)

    void ENET_Init (u32 operatingmode)

    {

    u32 i;

    vu32 regValue;

    ENET_MACConfig *MAC_Config;

    ENET_MACConfig config;

    ...

    ...

    /* Put the PHY in reset mode */

    ENET_MIIWriteReg(0x0,MAC_MII_REG_XCR, 0x8000);

    /* Delay to assure PHY reset */

    for(i=0; i

    {

    regValue = (u32) i;

    }

    ...

    ....

    }

    it means that the address of the PHY is 0x0;but the data which I read from PR20-XMC is 0xaa(PAD4:0 10101).when I think the address of the PHY is 0x00,I also can read ID of PHY(STE100P)and the ID is right.So what I wonder is that what is the address of PHY ,how to define ?In my evaluation board the Mf4:0 is 10111.I appreciate your help.

    Best Regards

    sunshan

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:39

    Follow up question:

    what is the proper amount of delay to assure that PHY has been reset?

    The datasheet

    http://www.st.com/stonline/products/literature/ds/6806.pdf

    is not clear on this point.

    Any help from ST would be appreciated.

    -Jeremy

    [ This message was edited by: jsarao on 04-10-2007 02:10 ]