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.

Disable Ethernet module

We have no need for the Ethernet module (CSL_PSC_3PSW) and we would like to disable that module to reduce power. I used the following code to try to achieve this it appears to hang waiting for the state change. We used JTAG to look at the state of the clock which is still active. The code seems to be effective for other modules such as I2C and VICP. Is there something special about the 2nd power domain?

/*! \brief Set the state of PSC modeule */
void bspDisablePSC(int dev)
{
    CSL_PscRegsOvly pscRegs = (CSL_PscRegsOvly)CSL_PSC_0_REGS;

    if (dev < 0 || dev > 34)
        return;

    if (CSL_FEXT(pscRegs->MDSTAT[dev], PSC_MDSTAT_STATE)
                == CSL_PSC_MDSTAT_STATE_DISABLE)
        return;
   
    // deassert GPIO local PSC reset and set NEXT state to DISBLE
    pscRegs->MDCTL[dev] = CSL_FMKT(PSC_MDCTL_NEXT, DISABLE)
                                   | CSL_FMKT(PSC_MDCTL_LRST, DEASSERT);
    // move GPIO PSC to Next state
    if (dev == CSL_PSC_3PSW)
        pscRegs->PTCMD = CSL_FMKT(PSC_PTCMD_GO0, SET) << 1;
    else
        pscRegs->PTCMD = CSL_FMKT(PSC_PTCMD_GO0, SET);

    // wait for transition
    while (CSL_FEXT(pscRegs->MDSTAT[dev], PSC_MDSTAT_STATE)
            != CSL_PSC_MDSTAT_STATE_DISABLE)
        ;
}  
   
/*! \brief Set the state of PSC modeule */
void bspSWRDisablePSC(int dev)
{  
    CSL_PscRegsOvly pscRegs = (CSL_PscRegsOvly)CSL_PSC_0_REGS;

    if (dev < 0 || dev > 34)
        return;
   
    if (CSL_FEXT(pscRegs->MDSTAT[dev], PSC_MDSTAT_STATE)
                == CSL_PSC_MDSTAT_STATE_SWRSTDISABLE)
        return;

    // deassert GPIO local PSC reset and set NEXT state to DISABLE
    pscRegs->MDCTL[dev] = CSL_FMKT(PSC_MDCTL_NEXT, SWRSTDISABLE)
                                   | CSL_FMKT(PSC_MDCTL_LRST, DEASSERT);
    // move GPIO PSC to Next state
    if (dev == CSL_PSC_3PSW)
        pscRegs->PTCMD = CSL_FMKT(PSC_PTCMD_GO0, SET) << 1;
    else
        pscRegs->PTCMD = CSL_FMKT(PSC_PTCMD_GO0, SET);

    // wait for transition
    while (CSL_FEXT(pscRegs->MDSTAT[dev], PSC_MDSTAT_STATE)
            != CSL_PSC_MDSTAT_STATE_SWRSTDISABLE)
        ;
}

void mainTask ( void )

{

:

bspDisablePSC(CSL_PSC_3PSW);

Thanks