TMS320F28377D: LPM current consumption and making wakeup pulse chip

Part Number: TMS320F28377D

Tool/software:

Hello,

1.
I entered Hibernate mode, but the current consumption did not decrease as much as expected, so I added the following code.
When I disabled registers marked as Powered off in the TRM (code sections 2 and 3), there was little difference.
However, when I configured the GPIO set (section 1), the 3.3V VDDIO consumption during sleep dropped from 4 mA to 2.5 mA.

Could you explain what kind of influence the GPIO configuration has in this case?

Also, according to the manual, entering Hibernate mode typically consumes about 0.75 mA at room temperature.
Are there any additional code examples to further reduce the current consumption?

// 1. GPIO Set
EALLOW;
GpioCtrlRegs.GPAPUD.all = 0xFFFF;  // 1 = Disable pull-up (all pull-ups off)
GpioCtrlRegs.GPBPUD.all = (uint16)(0xFFFFU & (uint16)~(1U << 9)); // Keep pull-up enabled (0) only for GPB9
GpioCtrlRegs.GPCPUD.all = 0xFFFF;
GpioCtrlRegs.GPDPUD.all = 0xFFFF;
GpioCtrlRegs.GPEPUD.all = 0xFFFF;
GpioCtrlRegs.GPFPUD.all = 0xFFFF;

// Release output drive: configure all pins as input (reconfigure only the required pins)
GpioCtrlRegs.GPADIR.all = 0x0000;
GpioCtrlRegs.GPBDIR.all = 0x0000;
GpioCtrlRegs.GPCDIR.all = 0x0000;
GpioCtrlRegs.GPDDIR.all = 0x0000;
GpioCtrlRegs.GPEDIR.all = 0x0000;
GpioCtrlRegs.GPFDIR.all = 0x0000;

// Set all pin functions to GPIO (disconnect peripheral functions)
GpioCtrlRegs.GPAGMUX1.all = 0; GpioCtrlRegs.GPAMUX1.all = 0;
GpioCtrlRegs.GPAGMUX2.all = 0; GpioCtrlRegs.GPAMUX2.all = 0;
GpioCtrlRegs.GPBGMUX1.all = 0; GpioCtrlRegs.GPBMUX1.all = 0;
GpioCtrlRegs.GPBGMUX2.all = 0; GpioCtrlRegs.GPBMUX2.all = 0;
GpioCtrlRegs.GPCGMUX1.all = 0; GpioCtrlRegs.GPCMUX1.all = 0;
GpioCtrlRegs.GPCGMUX2.all = 0; GpioCtrlRegs.GPCMUX2.all = 0;
GpioCtrlRegs.GPDGMUX1.all = 0; GpioCtrlRegs.GPDMUX1.all = 0;
GpioCtrlRegs.GPDGMUX2.all = 0; GpioCtrlRegs.GPDMUX2.all = 0;
GpioCtrlRegs.GPEGMUX1.all = 0; GpioCtrlRegs.GPEMUX1.all = 0;
GpioCtrlRegs.GPEGMUX2.all = 0; GpioCtrlRegs.GPEMUX2.all = 0;
GpioCtrlRegs.GPFGMUX1.all = 0; GpioCtrlRegs.GPFMUX1.all = 0;

GpioCtrlRegs.GPBQSEL1.bit.GPIO41 = 3;   // 11b = Asynchronous

// LED OFF
// GPIO 50 - LED_1, GPIO 51 - LED_2, GPIO 52 - LED_3
GpioDataRegs.GPBCLEAR.bit.GPIO50 = 1U;
GpioCtrlRegs.GPBPUD.bit.GPIO50 = 0U;
GpioCtrlRegs.GPBDIR.bit.GPIO50 = 1U;

GpioDataRegs.GPBCLEAR.bit.GPIO51 = 1U;
GpioCtrlRegs.GPBPUD.bit.GPIO51 = 0U;
GpioCtrlRegs.GPBDIR.bit.GPIO51 = 1U;

GpioDataRegs.GPBCLEAR.bit.GPIO52 = 1U;
GpioCtrlRegs.GPBPUD.bit.GPIO52 = 0U;
GpioCtrlRegs.GPBDIR.bit.GPIO52 = 1U;

// CAN SET OFF
SetCANStatus(A_SLEEP);
GpioCtrlRegs.GPBPUD.bit.GPIO32 = 0U;
GpioCtrlRegs.GPBDIR.bit.GPIO32 = 1U;

SetCANStatus(B_SLEEP);
GpioCtrlRegs.GPBPUD.bit.GPIO40 = 0U;
GpioCtrlRegs.GPBDIR.bit.GPIO40 = 1U;
EDIS;

// 2. ADC, DAC, COMP comparator OFF
EALLOW;
AdcaRegs.ADCCTL1.bit.ADCPWDNZ = 0; // ADC disable
AdcbRegs.ADCCTL1.bit.ADCPWDNZ = 0;
AdccRegs.ADCCTL1.bit.ADCPWDNZ = 0;
AdcdRegs.ADCCTL1.bit.ADCPWDNZ = 0;

Cmpss1Regs.COMPCTL.bit.COMPDACE = 0; // Comparator/DAC disable
Cmpss2Regs.COMPCTL.bit.COMPDACE = 0;
Cmpss3Regs.COMPCTL.bit.COMPDACE = 0;
Cmpss4Regs.COMPCTL.bit.COMPDACE = 0;
Cmpss5Regs.COMPCTL.bit.COMPDACE = 0;
Cmpss6Regs.COMPCTL.bit.COMPDACE = 0;
Cmpss7Regs.COMPCTL.bit.COMPDACE = 0;
Cmpss8Regs.COMPCTL.bit.COMPDACE = 0;

DacaRegs.DACOUTEN.bit.DACOUTEN = 0;  // DAC output disable
DacbRegs.DACOUTEN.bit.DACOUTEN = 0;
DaccRegs.DACOUTEN.bit.DACOUTEN = 0;
EDIS;

// 3. M0/M1 OFF
EALLOW;
CpuSysRegs.LPMCR.bit.M0M1MODE = 1U; // M0/M1 off in HIB
EDIS;

if (GPIO41_StableHigh_Poll(GUARD_POST) == 0U) {
    WatchDogReset();
}

DINT;
IFR = 0x0000U;
PieCtrlRegs.PIEACK.all = 0xFFFFU;

HIB(); // TI example function

2.
For wake-up from LPM, I configured hardware so that when power is applied, a pulse (H→L→H) is generated on pin 41 at the same time.
I heard in the forum that there is a dedicated chip that can generate this wakeup pulse.
Could you let me know the name of such a chip?


Thanks in advance.

  • Hi,

    The GPIO configuration code reduces VDDIO current consumption because the I/O pads remain powered during Hibernate mode. By configuring the GPIOs to a high-impedance state with pull-ups disabled, current leakage through the pins is minimized.

    • Disconnecting Peripheral Functions: By setting the GPxMUX and GPxGMUX registers to 0, you configure the pins as general-purpose I/O and disconnect them from internal peripherals. This prevents peripherals from driving the pins or drawing current.
    • Setting Pin Direction to Input: Configuring pins as inputs (GPxDIR.all = 0x0000) puts them in a high-impedance state. If a pin were configured as an output driving an external load, it would continue to source or sink current from VDDIO during Hibernate.
    • Disabling Internal Pull-up Resistors: By writing 0xFFFF to the GPxPUD registers, you disable the internal pull-up resistors on most pins. An enabled pull-up resistor will draw current if the pin is driven low by an external circuit. Disabling them eliminates this potential current path.

    Further Reducing Current Consumption - The datasheet specifies a typical IDDIO current of 750 µA in Hibernate mode. However, this value is measured under the specific test condition where "All I/O pins are left unconnected." The higher current of 2.5 mA on your board may likely due to external components connected to the GPIOs.

    Thanks