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.

TMS320F28035: Reducing Current Consumption for TMS320F28035

Part Number: TMS320F28035

As 2803x datasheet described below, significant reduction in current consumption can be achieved by turning off the clock to any peripheral module that is not used in a given application.

I turn off the clock to peripheral module like I2C, eCAP, eQEP, SCI, SPI, COMP/DAC, HRPWM, HRCAP and CLA, according to table 5-2, about 45mA current consumption can be reduced, but there is no current  consumption difference between disabling those peripheral module clock and enabling those peripheral module clock, both the current are about 112mA. Following are the codes that I turn off the clock to those peripheral module.  So what's wrong?

void InitPeripheralClocks(void)
{
EALLOW;

// LOSPCP prescale register settings, normally it will be set to default values

//GpioCtrlRegs.GPAMUX2.bit.GPIO18 = 3; // GPIO18 = XCLKOUT
SysCtrlRegs.LOSPCP.all = 0x0002;

// XCLKOUT to SYSCLKOUT ratio. By default XCLKOUT = 1/4 SYSCLKOUT
SysCtrlRegs.XCLK.bit.XCLKOUTDIV=2;

// Peripheral clock enables set for the selected peripherals.
// If you are not using a peripheral leave the clock off
// to save on power.
//
// Note: not all peripherals are available on all 2803x derivates.
// Refer to the datasheet for your particular device.
//
// This function is not written to be an example of efficient code.

SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1; // ADC
SysCtrlRegs.PCLKCR3.bit.COMP1ENCLK = 0; // COMP1
SysCtrlRegs.PCLKCR3.bit.COMP2ENCLK = 0; // COMP2
SysCtrlRegs.PCLKCR3.bit.COMP3ENCLK = 0; // COMP3
SysCtrlRegs.PCLKCR1.bit.ECAP1ENCLK = 0; // eCAP1
SysCtrlRegs.PCLKCR0.bit.ECANAENCLK=1; // eCAN-A
SysCtrlRegs.PCLKCR1.bit.EQEP1ENCLK = 0; // eQEP1
SysCtrlRegs.PCLKCR1.bit.EPWM1ENCLK = 1; // ePWM1
SysCtrlRegs.PCLKCR1.bit.EPWM2ENCLK = 1; // ePWM2
SysCtrlRegs.PCLKCR1.bit.EPWM3ENCLK = 1; // ePWM3
SysCtrlRegs.PCLKCR1.bit.EPWM4ENCLK = 1; // ePWM4
SysCtrlRegs.PCLKCR1.bit.EPWM5ENCLK = 1; // ePWM5
SysCtrlRegs.PCLKCR1.bit.EPWM6ENCLK = 1; // ePWM6
SysCtrlRegs.PCLKCR1.bit.EPWM7ENCLK = 1; // ePWM7
SysCtrlRegs.PCLKCR0.bit.HRPWMENCLK = 0; // HRPWM
SysCtrlRegs.PCLKCR0.bit.I2CAENCLK = 0; // I2C
SysCtrlRegs.PCLKCR0.bit.LINAENCLK = 1; // LIN-A
SysCtrlRegs.PCLKCR3.bit.CLA1ENCLK = 0; // CLA1
SysCtrlRegs.PCLKCR0.bit.SCIAENCLK = 0; // SCI-A
SysCtrlRegs.PCLKCR0.bit.SPIAENCLK = 0; // SPI-A
SysCtrlRegs.PCLKCR0.bit.SPIBENCLK = 0; // SPI-B
SysCtrlRegs.PCLKCR2.bit.HRCAP1ENCLK = 0; 
SysCtrlRegs.PCLKCR2.bit.HRCAP2ENCLK = 0;

SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 1; // Enable TBCLK within the ePWM

EDIS;
}