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.

MAP_SysCtlPeripheralReset(SYSCTL_PERIPH_EPHY0) gets stucked with TM4C1294NCPDT

Hi

When I ran enet_lwip project on the board designed by ourself, I got stucked at MAP_SysCtlPeripheralReset(SYSCTL_PERIPH_EPHY0); I just could't figure it out, Pls help me.

BTW,it works well on your board.

if((EMAC_PHY_CONFIG & EMAC_PHY_TYPE_MASK) == EMAC_PHY_TYPE_INTERNAL)
{
       //
       // We've been asked to configure for use with the internal
       // PHY. Is it present?
        //
      if(MAP_SysCtlPeripheralPresent(SYSCTL_PERIPH_EPHY0))
      {
              //
              // Yes - enable and reset it.
               //
              MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_EPHY0);
              MAP_SysCtlPeripheralReset(SYSCTL_PERIPH_EPHY0);
      }
      else
      {
           //
          // Internal PHY is not present on this part so hang here.
           //
          while(1)
          {
          }
       }
}

  • It seems to be caused by errata ETH#02. Please check the errata and apply the workaround.

    Thanks and regards,

    Zhaohong
  • Hi 

    Thanks for  your answer, but  i am not farmiliar with errata,would you pls give me more infromation?

    By the way, since i use rom driver,i try to use code in driverlib project and find that it will not run over 

    HWREGBITW(SYSCTL_SRBASE + ((ui32Peripheral & 0xff00) >> 8),ui32Peripheral & 0xff) = 1; to the delay code.

    meanwhile,there is no hardfault interrupt,no ethernet interrupt,since i use jlink to debug,it cann't pause,so i don't know where it run.

    why? pls help me to solve this basic issue as soon as possible

    Thanks very much

    void
    SysCtlPeripheralReset(uint32_t ui32Peripheral)
    {
    volatile uint_fast8_t ui8Delay;

    //
    // Check the arguments.
    //
    ASSERT(_SysCtlPeripheralValid(ui32Peripheral));

    //
    // Put the peripheral into the reset state.
    //
    HWREGBITW(SYSCTL_SRBASE + ((ui32Peripheral & 0xff00) >> 8),
    ui32Peripheral & 0xff) = 1;

    //

    // Delay for a little bit.

    //

    //we cann't get here
    for(ui8Delay = 0; ui8Delay < 16; ui8Delay++)
    {
    }

    //
    // Take the peripheral out of the reset state.
    //
    HWREGBITW(SYSCTL_SRBASE + ((ui32Peripheral & 0xff00) >> 8),
    ui32Peripheral & 0xff) = 0;
    }

  • Hello Profund

    In addition to Zhaohong's statement, can you confirm that the RBIAS resistor is connected (the value must be as described in the data sheet) and the Main Oscillator of 25MHz mounted and working?

    Regards
    Amit
  • Hi Amit
    Yes,we design as LaunchPad Evaluation Kit schematic, the RBIAS is 4.87K(1%)and Oscillator is 25M, and it works, is there other things important?
    Regards
  • Hello Profound,

    There is no obvious reason why code will hang there. I would suggest

    1. Remove Code optimizations during compile
    2. Compile the driverlib as well w/o code optimization. Only then can we see where the code is actually hanging.

    Regards
    Amit