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.

MSPM0G1107: Question about power modes for the MSPM0G1107

Part Number: MSPM0G1107
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi Madhurya,

I want to add to the question which was sent by us with the same mail subject.

We have the mspm01107 embedded on our board.
We can measure the current to the m0 by placing a small resistor to the vdd of the m0.

- The current drawn by an empty m0 (erased) is very low < 1uA.

- The current drawn by an m0 hold in reset is 500uA

- The current drawn by a project which has 25 pins set to input no pull is 1.9mA. All not used pins are also set to input no pull.
What are we doing wrong?

int main(void)
{
SYSCFG_DL_init();
DL_SYSCTL_setPowerPolicySTANDBY0(); __WFI();
}


Content: ti_msp_dl_config.c

/*
* Copyright (c) 2023, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/*
* ============ ti_msp_dl_config.c =============
* Configured MSPM0 DriverLib module definitions
*
* DO NOT EDIT - This file is generated for the MSPM0G350X
* by the SysConfig tool.
*/

#include "ti_msp_dl_config.h"

/*
* ======== SYSCFG_DL_init ========
* Perform any initialization needed before using any board APIs
*/
SYSCONFIG_WEAK void SYSCFG_DL_init(void)
{
SYSCFG_DL_initPower();
SYSCFG_DL_GPIO_init();
/* Module-Specific Initializations*/
SYSCFG_DL_SYSCTL_init();
SYSCFG_DL_SYSTICK_init();
SYSCFG_DL_SYSCTL_CLK_init();
}

SYSCONFIG_WEAK void SYSCFG_DL_initPower(void)
{
DL_GPIO_reset(GPIOA);
DL_GPIO_reset(GPIOB);


DL_GPIO_enablePower(GPIOA);
DL_GPIO_enablePower(GPIOB);

delay_cycles(POWER_STARTUP_DELAY);
}

SYSCONFIG_WEAK void SYSCFG_DL_GPIO_init(void)
{
const uint8_t unusedPinIndexes[] =
{
IOMUX_PINCM34, IOMUX_PINCM35, IOMUX_PINCM36, IOMUX_PINCM37,
IOMUX_PINCM38, IOMUX_PINCM44, IOMUX_PINCM46, IOMUX_PINCM47,
IOMUX_PINCM53, IOMUX_PINCM3, IOMUX_PINCM4, IOMUX_PINCM5,
IOMUX_PINCM6, IOMUX_PINCM13, IOMUX_PINCM19, IOMUX_PINCM27,
IOMUX_PINCM28
};

for(int i = 0; i < sizeof(unusedPinIndexes)/sizeof(unusedPinIndexes[0]); i++)
{
DL_GPIO_initDigitalInput(unusedPinIndexes[i]);
}

/* Configure GPIO/IOMUX for LFXT functionality */
DL_GPIO_initPeripheralAnalogFunction(GPIO_LFXIN_IOMUX);
DL_GPIO_initPeripheralAnalogFunction(GPIO_LFXOUT_IOMUX);
DL_GPIO_initPeripheralAnalogFunction(GPIO_ROSC_IOMUX);

DL_GPIO_initDigitalInput(BOOT_DBG_BOOTn_IOMUX);

DL_GPIO_initDigitalInput(BOOT_USB_BOOT_IOMUX);

DL_GPIO_initDigitalInput(KEYBOARD_KEY_TEST_IOMUX);

DL_GPIO_initDigitalInput(KEYBOARD_KEY_FUNC_IOMUX);

DL_GPIO_initDigitalInput(KEYBOARD_KEY_MEAS_FORM_IOMUX);

DL_GPIO_initDigitalInput(KEYBOARD_KEY_SAVE_IOMUX);

DL_GPIO_initDigitalInput(KEYBOARD_KEY_MENU_IOMUX);

DL_GPIO_initDigitalInput(KEYBOARD_ROTARY_PUSH_IOMUX);

DL_GPIO_initDigitalInput(KEYBOARD_KEY_FC_IOMUX);

DL_GPIO_initDigitalInputFeatures(KEYBOARD_ONKEYIN_IOMUX,
DL_GPIO_INVERSION_ENABLE, DL_GPIO_RESISTOR_NONE,
DL_GPIO_HYSTERESIS_DISABLE, DL_GPIO_WAKEUP_DISABLE);

DL_GPIO_initDigitalInput(ARM_INT_CPU_IOMUX);

DL_GPIO_initDigitalInput(ARM_SPI_HANDSHAKE_IOMUX);

DL_GPIO_initDigitalInput(ARM_MSPM0_INT_IOMUX);

DL_GPIO_initDigitalInput(ARM_IMX_ONOFF_IOMUX);

DL_GPIO_initDigitalInput(ARM_M4_EWM_IOMUX);

DL_GPIO_initDigitalInput(ARM_PMIC_WDI_IOMUX);

DL_GPIO_initDigitalInput(BSL_DEBUG_PIN_0_BSL_SDA_IOMUX);

DL_GPIO_initDigitalInput(BSL_DEBUG_PIN_1_BSL_SCL_IOMUX);

DL_GPIO_initDigitalInput(BSL_DEBUG_PIN_BSL_INVOKE_IOMUX);

DL_GPIO_initDigitalInput(POWERCONTROL_EN_5V0_IOMUX);

DL_GPIO_initDigitalInput(POWERCONTROL_EN_IO_IOMUX);

DL_GPIO_initDigitalInput(POWERCONTROL_EN_BAT_IOMUX);

DL_GPIO_initDigitalInput(LEDS_LED_W_IOMUX);

DL_GPIO_initDigitalInput(LEDS_LED_FC_IOMUX);

DL_GPIO_initDigitalInput(LEDS_LED_R_IOMUX);

DL_GPIO_initDigitalInput(LEDS_LED_G_IOMUX);

DL_GPIO_initDigitalInput(LEDS_LED_B_IOMUX);

DL_GPIO_initDigitalInput(MANSELL_MANSELL_GPIO1_IOMUX);

DL_GPIO_initDigitalInput(MANSELL_MANSELL_GPIO2_IOMUX);

DL_GPIO_initDigitalInput(MANSELL_FAN_PWM_IOMUX);

DL_GPIO_initDigitalInput(MANSELL_FAN_RPM_IOMUX);

DL_GPIO_initDigitalInput(PD_CHIP_PD_GPIO2_IOMUX);

DL_GPIO_initDigitalInput(PD_CHIP_PD_INTn_IOMUX);

DL_GPIO_initDigitalInput(PD_CHIP_USB_VBUS_DETECT_IOMUX);

DL_GPIO_initDigitalInput(PD_CHIP_PD_GPIO1_IOMUX);

DL_GPIO_initDigitalInput(BQ_CHIP_CHARGE_OK_IOMUX);

DL_GPIO_initDigitalInput(BQ_CHIP_PROCHOT_IOMUX);

DL_GPIO_initDigitalInput(BQ_CHIP_USB_OTG_EN_IOMUX);

DL_GPIO_setUpperPinsPolarity(GPIOB, DL_GPIO_PIN_26_EDGE_RISE |
DL_GPIO_PIN_21_EDGE_RISE);
DL_GPIO_setUpperPinsInputFilter(GPIOB, DL_GPIO_PIN_26_INPUT_FILTER_8_CYCLES);
DL_GPIO_clearInterruptStatus(GPIOB, KEYBOARD_ONKEYIN_PIN |
BQ_CHIP_CHARGE_OK_PIN);
DL_GPIO_enableInterrupt(GPIOB, KEYBOARD_ONKEYIN_PIN |
BQ_CHIP_CHARGE_OK_PIN);

}


static const DL_SYSCTL_LFCLKConfig gSYSCTLConfig = {
.lowCap = false,
.monitor = false,
.xt1Drive = DL_SYSCTL_LFXT_DRIVE_STRENGTH_HIGHEST,
};

SYSCONFIG_WEAK void SYSCFG_DL_SYSCTL_init(void)
{

//Low Power Mode is configured to be SLEEP0
DL_SYSCTL_setBORThreshold(DL_SYSCTL_BOR_THRESHOLD_LEVEL_0);

DL_SYSCTL_setSYSOSCFreq(DL_SYSCTL_SYSOSC_FREQ_BASE);
DL_SYSCTL_enableSYSOSCFCL();
DL_SYSCTL_setLFCLKSourceLFXT((DL_SYSCTL_LFCLKConfig *) &gSYSCTLConfig);
DL_SYSCTL_setULPCLKDivider(DL_SYSCTL_ULPCLK_DIV_1);
DL_SYSCTL_setMCLKDivider(DL_SYSCTL_MCLK_DIVIDER_DISABLE);

}
SYSCONFIG_WEAK void SYSCFG_DL_SYSCTL_CLK_init(void) {
while ((DL_SYSCTL_getClockStatus() & (DL_SYSCTL_CLK_STATUS_LFXT_GOOD))
!= (DL_SYSCTL_CLK_STATUS_LFXT_GOOD))
{
/* Ensure that clocks are in default POR configuration before initialization.
* Additionally once LFXT is enabled, the internal LFOSC is disabled, and cannot
* be re-enabled other than by executing a BOOTRST. */
;
}
}



SYSCONFIG_WEAK void SYSCFG_DL_SYSTICK_init(void)
{
/*
* Initializes the SysTick period to 500.00 μs,
* enables the interrupt, and starts the SysTick Timer
*/
DL_SYSTICK_config(16000);
}











  • Hi Jos,

    The measurement method by a high precision resistor has no problem in this case. But you should configure all of pins unused(or used as input) to pullup/pulldown. Otherwise their maybe some unexpected power consumption.

    Actually, I'm not too clear about you question? Do you think the current of 1.9mA is abnormal for you ?

    Regards,

    Pengfei

  • Hi Pengfrei,

    As recommended i set all (non) used pins to input pull. It worked. The current consumption of the m0 in standby0 mode now is 1mA. Still a bit high to my opinion.

  • Hi Jos,

    The expected current for standby0 mode is within 2uA. And according to your software configuration, it seems no peripheral enabled.

    So the abnormal current (1mA) in standby0 mode may be caused by hardware circuit. For example, there may be some external pull-up resisters connected to internal pull-down input pin, or LED output pins are default active to consume much current.

    Please check your hardware schematic, especially IO state when measuring. If possible, you could attach you schematic picture and updated GPIO configuration in this thread.

    Regards,

    Pengfei

  • Hi Jos,

    Is there any other problem of this thread? I will close this thread firstly and you could restart it if you have any other questions.

    Regards,

    Pengfei