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.

TM4C129XNCZAD: Do I need to manually disable Ethernet power?

Part Number: TM4C129XNCZAD

I am in the process of porting code that was originally written for a Stellaris processor over to a TM4C129X chip. I came across the following code in the board initialization:


    /* Disable Ethernet */
    if (SysCtlPeripheralPresent(SYSCTL_PERIPH_ETH))
    {
            SysCtlPeripheralEnable(SYSCTL_PERIPH_ETH);
            SysCtlPeripheralReset(SYSCTL_PERIPH_ETH);
            EthernetInit(ETH_BASE);
            /* wait for 100ms - undocumented */
            SysCtlDelay(SysCtlClockGet()/30); /* 3 cycles per loop count */
            EthernetPHYWrite(ETH_BASE, PHY_MR0, 0x00000800); // Power down
    }

Is it really necessary to enable the Ethernet peripheral and explictly set its Power bit in the control register in order to save on power consumption? I would have thought that unless you enable the peripheral, it would not draw any power.

Regards,

Dave


  • Hi Dave,

      First of all, please note that the ethernet implementation between the LM family and TM4C129 is entirely different. Please reference the below user's guide on migration from LM devices to TM4C129 especially for the Ethernet section. You will need to enable and reset the EMAC and PHY separately in TM4C129 like below lines. Do you plan to use the Ethernet module functionality in your application? If you do not want to use Ethernet then you can just disable the EMAC and PHY. If you plan to use the ethernet and also wanting to save some power while the PHY is in operation then you can put the PHY in power down mode. During PHY power down only minimal register functionality is enabled

    SysCtlPeripheralEnable(SYSCTL_PERIPH_EMAC0);
    SysCtlPeripheralEnable(SYSCTL_PERIPH_EPHY0);
    SysCtlPeripheralReset(SYSCTL_PERIPH_EMAC0);
    SysCtlPeripheralReset(SYSCTL_PERIPH_EPHY0);

  • Hi, Charles,

    Thanks for the info, especially the link to the migration guide. That will come in very helpful.

    My project is not using ethernet at all, so I just want to make sure that circuitry is turned off. If I understand you correctly, that means I just need to call SystCtlPeripheralDisable() for both the emac and phy?

    Regards,

    Dave

  • Hi Dave,
    Your understanding is correct.
  • Great! Thanks again for your help, Charles.

    Regards,

    Dave