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.

TM4C129ENCPDT: Seeing occasional hang after rebooting processor

Part Number: TM4C129ENCPDT

We are using the function call MAP_SysCtlReset(); to reset the processor.

During reboot, we call a function to Initializes the lwIP TCP/IP stack.
In that function, we call these functions and hang while waiting for SYSCTL_PERIPH_EPHY0 to become ready

if(MAP_SysCtlPeripheralPresent(SYSCTL_PERIPH_EPHY0))
{
    MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_EPHY0);
    MAP_SysCtlPeripheralReset(SYSCTL_PERIPH_EPHY0);
    // Wait for EPHY to reset
    while(!MAP_SysCtlPeripheralReady(SYSCTL_PERIPH_EPHY0))  <- hangs here
    {
    }

What's the best way to recover from this?
Would calling MAP_SysCtlPeripheralReset() again recover, or do we need to reset the entire ethernet peripheral?

Thanks
Jeff

  • Hi Jeff,

      Can you help me understand the problem a bit better? 

      Is the hang happening every time on your custom board?

      Does the hang happen on your other custom boards?

      Can you repeat the hang on a LaunchPad?

      Can you try switching OFF prefetch buffer before PHY Configuration. The register is called FLASHCONF and the bit to be set is FPOFF. I'm not sure if you are hitting the below errata. 

  • The hang rarely happens and it looks like only after a reboot (not a power on).
    I looks like doing another MAP_SysCtlPeripheralReset(SYSCTL_PERIPH_EPHY0) fixes the problem.
    We are not switching off the prefetch, but will give it a try (and I was wondering if something like this was causing the issue)

    Either way, I think our issue will be solved.

    Thanks