This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C129DNCPDT: Problem in configuring with external phy interface

Part Number: TM4C129DNCPDT

Hi 

I am using tm4c129dncpdt for my project and in this project I am using lwip stack and I am going to interface external phy for ethernet and the phy is ksz8081rnbca .

My interface for the device and phy will be RMII. I have configured like below

ROM_GPIOPinConfigure(GPIO_PG3_EN0TXEN);
ROM_GPIOPinConfigure(GPIO_PG5_EN0TXD1);
ROM_GPIOPinConfigure(GPIO_PG4_EN0TXD0);
ROM_GPIOPinConfigure(GPIO_PG7_EN0RXDV);
ROM_GPIOPinConfigure(GPIO_PQ5_EN0RXD0);
ROM_GPIOPinConfigure(GPIO_PQ6_EN0RXD1);
ROM_GPIOPinConfigure(GPIO_PK4_EN0INTRN);
ROM_GPIOPinConfigure(GPIO_PF2_EN0MDC);
ROM_GPIOPinConfigure(GPIO_PF3_EN0MDIO);
ROM_GPIOPinConfigure(GPIO_PM4_EN0RREF_CLK);


ROM_GPIOPinConfigure(GPIO_PF1_EN0LED2);
ROM_GPIOPinConfigure(GPIO_PK4_EN0LED0);
ROM_GPIOPinConfigure(GPIO_PK6_EN0LED1);
GPIOPinTypeEthernetLED(GPIO_PORTF_BASE, GPIO_PIN_1);
GPIOPinTypeEthernetLED(GPIO_PORTK_BASE, GPIO_PIN_4);
GPIOPinTypeEthernetLED(GPIO_PORTK_BASE, GPIO_PIN_6);
and after this I have defined the macro EMAC_PHY_TYPE_EXTERNAL_RMII..


The code is getting looped in EMACPHYConfigSet function.

Can anyone help me with this interface..

Regards 

Harish

  • Hi 

    Now I have given 50Mhz oscillator to the Xi  pin and to the Ref clock pin of KSZ8081RNB. Now their is no hanging in the EMACRESET of lwip and the code is working fine but the link is not getting detected when I connect the ethernet lan to my router.

    If anyone else have solved this problem ?

    Regards

    Harish

  • Harish MR said:
    Now their is no hanging in the EMACRESET of lwip and the code is working fine but the link is not getting detected when I connect the ethernet lan to my router.

    I haven't tried to use an external Phy, but looking at the lwipopts.h file the PHY_PHYS_ADDR macro defines the Phy address the lwIPLinkDetect() function reads to determine if the link is 'up'.

    Has the lwipopts.h PHY_PHYS_ADDR macro been set to match the Phy address of your KSZ8081RNB?

  • Hi Chester Gillon
    Thanks for responding
    Yes It is same according to thePhy address of KSZ8081RNB
    But Link Led's are not blinking. I have connected my device to a router through ethernet lan , before using 50Mhz oscillator the device was getting detected but now it is not.
  • I have doubts regarding using of lwip stack with external phy.
    I am using ksz8081rnb as external phy and the configuration register used for initialise in tm4c129.c file of lwip is not same as the register present in ksz8081. So do I have to edit the register value in EMACphyread or Emacphywrite of tm4c129.c ??

    Regards
    Harish
  • I am using Lwip stack for my project and in that lwipstack the program their is a tm4c129.c file which is programmed according the dp8series external phy

    but in my project I am using ksz8081 so I have changed the register configuration according to my external phy.

    So now my link is up but I am not getting Ip from my stack.

    Can somebody just guide me in right path ??

    Regards

    Harish