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.

EK-TM4C1294XL: Cannot achieve the datasheet minimum device current

Part Number: EK-TM4C1294XL

Hello,

I am currently using the example project for the TI TIVA evaluation board and one of the things I am experimenting with is sleep mode current.  According to the datasheet:

  • At room temperature
  • With Vdd and VDDA set to 3.3V
  • With all peripherals off
  • and with LDO voltage set to 0.9V
  • and with the device running on the 30kHz LFIOSC

I should be able to achieve a device current of 0.454mA.

To measure the device current, I have removed the jumper from JP2 on the evaluation board and have placed a meter in series at this jumper.  This allows me to measure current from the +3V3 net to the VDD and VDDA pins on the microprocessor.  So I should only be measuring the sleep current of the microprocessor itself and not the rest of the board.

The sleep mode example software uses a UART, 4 LEDs, a push button, a timer (when the device is running), and a PWM module (when the device is in deep sleep).  I have commented out all the code for the LEDs, the timer, and the PWM module.  I have changed the deep sleep mode LDO voltage setting to 0.9V (and I measure 0.88V to confirm).  I have left the push button enabled for convenience, so that I can still easily control when the device is in deep sleep mode.

I would expect to have a current draw in deep sleep mode close to the datasheet value, but instead I measure 3.95mA (about 8x what is expected).

I will attach my modified source file from the sleep mode example.

Can you tell me what I need to do to achieve the datasheet 0.454mA current draw?

  • //*****************************************************************************
    //
    // sleep_modes.c - Sleep modes example.
    //
    // Copyright (c) 2014-2020 Texas Instruments Incorporated.  All rights reserved.
    // Software License Agreement
    //
    //*****************************************************************************
    
    #include <stdint.h>
    #include <stdbool.h>
    #include "inc/hw_ints.h"
    #include "inc/hw_memmap.h"
    #include "inc/hw_types.h"
    #include "driverlib/debug.h"
    #include "driverlib/fpu.h"
    #include "driverlib/gpio.h"
    #include "driverlib/interrupt.h"
    #include "driverlib/pin_map.h"
    #include "driverlib/pwm.h"
    #include "driverlib/rom.h"
    #include "driverlib/rom_map.h"
    #include "driverlib/sysctl.h"
    #include "driverlib/timer.h"
    #include "driverlib/uart.h"
    #include "utils/uartstdio.h"
    #include "drivers/buttons.h"
    
    //*****************************************************************************
    //
    //! \addtogroup example_list
    //! <h1>Sleep Modes(sleep_modes)</h1>
    //!
    //! This example demonstrates the different power modes available on the Tiva
    //! C Series devices. The user button (USR-SW1) is used to cycle through the
    //! different power modes.
    //! The SRAM, Flash, and LDO are all configured to a lower power setting for
    //! the different modes.
    //!
    //! A timer is configured to toggle an LED in an ISR in both Run and Sleep
    //! mode.
    //! In Deep-Sleep the PWM is used to toggle the same LED in hardware. The three
    //! remaining LEDs are used to indicate the current power mode.
    //!
    //!         LED key in addition to the toggling LED:
    //!             3 LEDs on - Run Mode
    //!             2 LEDs on - Sleep Mode
    //!             1 LED on - Deep-Sleep Mode
    //!
    //! TODO: If using an IDE, disconnect from the Debug Session before attempting
    //! to enter Deep-Sleep or else the JTAG interface will conflict with entering
    //! Deep-Sleep mode and trigger a FaultISR!
    //!
    //! UART0, connected to the Virtual Serial Port and running at 115,200, 8-N-1,
    //! is used to display messages from this application.
    //
    //*****************************************************************************
    
    //****************************************************************************
    //
    // Status LED defines.
    //
    //****************************************************************************
    
    //
    // PF4
    //
    #define RUN_GPIO_SYSCTL     SYSCTL_PERIPH_GPIOF
    #define RUN_GPIO_BASE       GPIO_PORTF_BASE
    #define RUN_GPIO_PIN        GPIO_PIN_4
    
    //
    // PN0
    //
    #define SLEEP_GPIO_SYSCTL   SYSCTL_PERIPH_GPION
    #define SLEEP_GPIO_BASE     GPIO_PORTN_BASE
    #define SLEEP_GPIO_PIN      GPIO_PIN_0
    
    //
    // PN1
    //
    #define DSLEEP_GPIO_SYSCTL  SYSCTL_PERIPH_GPION
    #define DSLEEP_GPIO_BASE    GPIO_PORTN_BASE
    #define DSLEEP_GPIO_PIN     GPIO_PIN_1
    
    //
    // PF0
    //
    #define TOGGLE_GPIO_SYSCTL  SYSCTL_PERIPH_GPIOF
    #define TOGGLE_GPIO_BASE    GPIO_PORTF_BASE
    #define TOGGLE_GPIO_PIN     GPIO_PIN_0
    
    //****************************************************************************
    //
    // System clock rate in Hz.
    //
    //****************************************************************************
    uint32_t g_ui32SysClock;
    
    //****************************************************************************
    //
    // Global to track power state:
    // 0 - Run Mode
    // 1 - Sleep Mode
    // 2 - Deep-Sleep Mode
    //
    //****************************************************************************
    volatile uint32_t g_ui32SleepMode = 0;
    
    //*****************************************************************************
    //
    // The error routine that is called if the driver library encounters an error.
    //
    //*****************************************************************************
    #ifdef DEBUG
    void
    __error__(char *pcFilename, uint32_t ui32Line)
    {
    }
    #endif
    
    //*****************************************************************************
    //
    // Configure the UART and its pins. This must be called before UARTprintf().
    //
    //*****************************************************************************
    void
    ConfigureUART(void)
    {
        //
        // Enable the GPIO Peripheral used by the UART.
        //
        MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
    
        //
        // Enable UART0.
        //
        MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
    
        //
        // Configure GPIO Pins for UART mode.
        //
        MAP_GPIOPinConfigure(GPIO_PA0_U0RX);
        MAP_GPIOPinConfigure(GPIO_PA1_U0TX);
        MAP_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
    
        //
        // Initialize the UART for console I/O.
        //
        UARTStdioConfig(0, 115200, g_ui32SysClock);
    }
    
    //*****************************************************************************
    //
    // The function for setting the state of the LEDs for indicating the current
    // power mode.
    //
    //*****************************************************************************
    void
    PowerLEDsSet(void)
    {
        switch (g_ui32SleepMode)
        {
            case 0:
    
                //
                // Turn on LED(s) to indicate we are in Run Mode.
                //
    //            MAP_GPIOPinWrite(RUN_GPIO_BASE, RUN_GPIO_PIN, RUN_GPIO_PIN);
    //            MAP_GPIOPinWrite(SLEEP_GPIO_BASE, SLEEP_GPIO_PIN, SLEEP_GPIO_PIN);
    //            MAP_GPIOPinWrite(DSLEEP_GPIO_BASE, DSLEEP_GPIO_PIN,
    //                    DSLEEP_GPIO_PIN);
                MAP_GPIOPinWrite(RUN_GPIO_BASE, RUN_GPIO_PIN, ~RUN_GPIO_PIN);
                MAP_GPIOPinWrite(SLEEP_GPIO_BASE, SLEEP_GPIO_PIN, ~SLEEP_GPIO_PIN);
                MAP_GPIOPinWrite(DSLEEP_GPIO_BASE, DSLEEP_GPIO_PIN,
                        ~DSLEEP_GPIO_PIN);
    
                break;
    
            case 1:
    
                //
                // Turn on LED(s) to indicate we are in Sleep Mode.
                //
    //            MAP_GPIOPinWrite(RUN_GPIO_BASE, RUN_GPIO_PIN, ~RUN_GPIO_PIN);
    //            MAP_GPIOPinWrite(SLEEP_GPIO_BASE, SLEEP_GPIO_PIN, SLEEP_GPIO_PIN);
    //            MAP_GPIOPinWrite(DSLEEP_GPIO_BASE, DSLEEP_GPIO_PIN,
    //                    DSLEEP_GPIO_PIN);
                MAP_GPIOPinWrite(RUN_GPIO_BASE, RUN_GPIO_PIN, ~RUN_GPIO_PIN);
                MAP_GPIOPinWrite(SLEEP_GPIO_BASE, SLEEP_GPIO_PIN, ~SLEEP_GPIO_PIN);
                MAP_GPIOPinWrite(DSLEEP_GPIO_BASE, DSLEEP_GPIO_PIN,
                        ~DSLEEP_GPIO_PIN);
    
                break;
    
            case 2:
    
                //
                // Turn on LED(s) to indicate we are in Deep-Sleep Mode.
                //
    //            MAP_GPIOPinWrite(RUN_GPIO_BASE, RUN_GPIO_PIN, ~RUN_GPIO_PIN);
    //            MAP_GPIOPinWrite(SLEEP_GPIO_BASE, SLEEP_GPIO_PIN, ~SLEEP_GPIO_PIN);
    //            MAP_GPIOPinWrite(DSLEEP_GPIO_BASE, DSLEEP_GPIO_PIN,
    //                    DSLEEP_GPIO_PIN);
                MAP_GPIOPinWrite(RUN_GPIO_BASE, RUN_GPIO_PIN, ~RUN_GPIO_PIN);
                MAP_GPIOPinWrite(SLEEP_GPIO_BASE, SLEEP_GPIO_PIN, ~SLEEP_GPIO_PIN);
                MAP_GPIOPinWrite(DSLEEP_GPIO_BASE, DSLEEP_GPIO_PIN,
                        ~DSLEEP_GPIO_PIN);
    
                break;
    
            default:
                break;
        }
    }
    
    //*****************************************************************************
    //
    // The interrupt handler for the button interrupt.
    //
    //*****************************************************************************
    void
    ButtonIntHandler(void)
    {
        //
        // Delay here on button push for simple debouncing.
        //
        SysCtlDelay(g_ui32SysClock / 10);
    
        //
        // Clear the timer interrupt.
        //
        MAP_GPIOIntClear(GPIO_PORTJ_AHB_BASE, GPIO_INT_PIN_0);
    
        //
        // Increment Mode.
        //
        g_ui32SleepMode = (g_ui32SleepMode + 1) % 3;
    
        switch (g_ui32SleepMode)
        {
            //
            // Enter Run Mode.
            //
            case 0:
    
                //
                // Disable the PWM.
                //
    //            MAP_PWMGenDisable(PWM0_BASE, PWM_GEN_0);
    
                //
                // Configure Toggle LED as a GPIO output.
                //
    //            MAP_GPIOPinTypeGPIOOutput(TOGGLE_GPIO_BASE, TOGGLE_GPIO_PIN);
    
                //
                // Enable the timer.
                //
    //            MAP_TimerEnable(TIMER0_BASE, TIMER_A);
    
                //
                // Print mode over the UART.
                //
    //            UARTprintf("\033[100D");
    //            UARTprintf("\033[K");
    //            UARTprintf("Run\t\tMOSC with PLL\tTimer");
                SysCtlDelay(10000);
                break;
    
                //
                // Enter Sleep Mode.
                //
            case 1:
    
                //
                // Print mode over the UART.
                // Delay to let the UART finish before going to Sleep.
                //
    //            UARTprintf("\033[100D");
    //            UARTprintf("\033[K");
    //            UARTprintf("Sleep\t\tPIOSC\t\tTimer");
                SysCtlDelay(10000);
    
                //
                // Switch clock to PIOSC and power down the MOSC before going into 
                // Sleep.
                //
                g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_OSC_INT |
                                                          SYSCTL_USE_OSC |
                                                          SYSCTL_MAIN_OSC_DIS), 
                                                          16000000);
    
                break;
    
                //
                // Enter Deep-Sleep Mode.
                //
            case 2:
    
                //
                // Switch back to the MOSC + PLL.
                //
                g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
                                                          SYSCTL_OSC_MAIN |
                                                          SYSCTL_USE_PLL |
                                                          SYSCTL_CFG_VCO_160), 
                                                          16000000);
    
                //
                // Disable the timer.
                //
    //            MAP_TimerDisable(TIMER0_BASE, TIMER_A);
    
                //
                // Configure the toggle pin as a PWM pin.
                //
    //            MAP_GPIOPinConfigure(GPIO_PF0_M0PWM0);
    //            MAP_GPIOPinTypePWM(TOGGLE_GPIO_BASE, TOGGLE_GPIO_PIN);
    
                //
                // Enable the PWM.
                //
    //            MAP_PWMGenEnable(PWM0_BASE, PWM_GEN_0);
    
                //
                // Print mode over the UART.
                // Delay to let the UART finish before going to Sleep.
                //
    //            UARTprintf("\033[100D");
    //            UARTprintf("\033[K");
    //            UARTprintf("Deep-Sleep\tLFIOSC\t\tPWM");
                SysCtlDelay(10000);
                break;
    
            default:
                break;
        }
    
        //
        // Set LEDs to show what mode we are in.
        //
    //    PowerLEDsSet();
    }
    
    
    //*****************************************************************************
    //
    // The interrupt handler for the timer interrupt.
    //
    //*****************************************************************************
    void
    Timer0IntHandler(void)
    {
        //
        // Clear the timer interrupt.
        //
        MAP_TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
    
        //
        // Toggle the LED.
        //
    //    MAP_GPIOPinWrite(TOGGLE_GPIO_BASE, TOGGLE_GPIO_PIN,
    //            (MAP_GPIOPinRead(TOGGLE_GPIO_BASE, TOGGLE_GPIO_PIN) ^
    //             TOGGLE_GPIO_PIN));
        MAP_GPIOPinWrite(TOGGLE_GPIO_BASE, TOGGLE_GPIO_PIN, 0);
    }
    
    //*****************************************************************************
    //
    // This example application demonstrates the use of the different sleep modes
    // and different power configuration options.
    //
    //*****************************************************************************
    int
    main(void)
    {
        //
        // Set the clocking to run from the MOSC with the PLL at 16MHz.
    	// Note: SYSCTL_CFG_VCO_160 is a new setting provided in TivaWare 2.2.x and
    	// later to better reflect the actual VCO speed due to SYSCTL#22.
        //
        g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
                                                 SYSCTL_OSC_MAIN |
                                                 SYSCTL_USE_PLL |
                                                 SYSCTL_CFG_VCO_160), 16000000);
    
    
        //
        // Set the clocking for Deep-Sleep.
        // Power down the PIOSC & MOSC to save power and run from the
        // internal 30kHz osc.
        //
        MAP_SysCtlDeepSleepClockConfigSet(1, (SYSCTL_DSLP_OSC_INT30 |
                    SYSCTL_DSLP_PIOSC_PD | SYSCTL_DSLP_MOSC_PD));
    
        //
        // Initialize the UART and write the banner.
        // Indicate we are currently in Run Mode.
        //
    //    ConfigureUART();
    //    UARTprintf("\033[2J\033[H");
    //    UARTprintf("Sleep Modes example\n\n");
    //    UARTprintf("Mode:\t\tClock Source:\tLED Toggle Source:");
    //    UARTprintf("\nRun\t\tMOSC with PLL\tTimer");
    
        //
        // Initialize the buttons driver.
        //
        ButtonsInit();
    
        //
        // Enable the interrupt for the button.
        //
        MAP_GPIOIntEnable(GPIO_PORTJ_AHB_BASE, GPIO_INT_PIN_0);
    
        //
        // Enable the GPIO ports that are used for the on-board LEDs.
        //
    //    MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);
    //    MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
    
        //
        // Set pad config.
        //
        MAP_GPIOPadConfigSet(GPIO_PORTJ_BASE, GPIO_PIN_0,
                              GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
    
        //
        // Set direction.
        //
        MAP_GPIODirModeSet(GPIO_PORTJ_BASE, GPIO_PIN_0, GPIO_DIR_MODE_IN);
    
        //
        // Enable the interrupt for the button.
        //
        MAP_GPIOIntEnable(GPIO_PORTJ_BASE, GPIO_INT_PIN_0);
    
        //
        // Enable interrupt to NVIC.
        //
        MAP_IntEnable(INT_GPIOJ);
    
        //
        // Enable the GPIO ports that are used for the on-board LEDs.
        //
    //    MAP_SysCtlPeripheralEnable(RUN_GPIO_SYSCTL);
    //    MAP_SysCtlPeripheralEnable(SLEEP_GPIO_SYSCTL);
    //    MAP_SysCtlPeripheralEnable(DSLEEP_GPIO_SYSCTL);
    //    MAP_SysCtlPeripheralEnable(TOGGLE_GPIO_SYSCTL);
    
        //
        // Enable the GPIO pins for the LED.
        //
    //    MAP_GPIOPinTypeGPIOOutput(RUN_GPIO_BASE, RUN_GPIO_PIN);
    //    MAP_GPIOPinTypeGPIOOutput(SLEEP_GPIO_BASE, SLEEP_GPIO_PIN);
    //    MAP_GPIOPinTypeGPIOOutput(DSLEEP_GPIO_BASE, DSLEEP_GPIO_PIN);
    //    MAP_GPIOPinTypeGPIOOutput(TOGGLE_GPIO_BASE, TOGGLE_GPIO_PIN);
    
        //
        // Enable the peripherals used by this example.
        //
    //    MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
    //    MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_PWM0);
    
        //
        // Enable processor interrupts.
        //
        MAP_IntMasterEnable();
    
        //
        // Configure the 32-bit periodic timer.
        //
    //    MAP_TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC);
    //    MAP_TimerLoadSet(TIMER0_BASE, TIMER_A, g_ui32SysClock);
    
        //
        // Setup the interrupts for the timer timeout.
        //
    //    MAP_IntEnable(INT_TIMER0A);
    //    MAP_TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
    
        //
        // Configure the PWM0 to count down without synchronization.
        // This will be used in Deep-Sleep.
        //
    //    MAP_PWMGenConfigure(PWM0_BASE, PWM_GEN_0,
    //                        PWM_GEN_MODE_DOWN | PWM_GEN_MODE_NO_SYNC);
    
        //
        // Enable the PWM0 output signal.
        //
    //    MAP_PWMOutputState(PWM0_BASE, PWM_OUT_0_BIT, true);
    
        //
        // Set up the period to match the timer.
        //
    //    MAP_PWMGenPeriodSet(PWM0_BASE, PWM_GEN_0, 65000);
    
        //
        // Configure the PWM for a 50% duty cycle.
        //
    //    MAP_PWMPulseWidthSet(PWM0_BASE, PWM_OUT_0, 65000 >> 1);
    
        //
        // Enable the timer.
        //
    //    MAP_TimerEnable(TIMER0_BASE, TIMER_A);
    
        //
        // Enable the Timer in Sleep Mode.
        //
    //    MAP_SysCtlPeripheralSleepEnable(SYSCTL_PERIPH_TIMER0);
    
        //
        // Enable the PWM in Deep-Sleep Mode.
        //
    //    MAP_SysCtlPeripheralDeepSleepEnable(SYSCTL_PERIPH_PWM0);
    
        //
        // Enable the Button Port in Sleep & Deep-Sleep Mode.
        //
        MAP_SysCtlPeripheralSleepEnable(SYSCTL_PERIPH_GPIOJ);
        MAP_SysCtlPeripheralDeepSleepEnable(SYSCTL_PERIPH_GPIOJ);
    
        //
        // Enable the LED Ports in Sleep & Deep-Sleep Mode.
        //
    //    MAP_SysCtlPeripheralSleepEnable(SLEEP_GPIO_SYSCTL);
    //    MAP_SysCtlPeripheralDeepSleepEnable(DSLEEP_GPIO_SYSCTL);
    //    MAP_SysCtlPeripheralSleepEnable(TOGGLE_GPIO_SYSCTL);
    //    MAP_SysCtlPeripheralDeepSleepEnable(TOGGLE_GPIO_SYSCTL);
    
        //
        // Enable Auto Clock Gating Control.
        //
        MAP_SysCtlPeripheralClockGating(true);
    
        //
        // Set LDO to 1.15V in Sleep.
        // Set LDO to 1.10V in Deep-Sleep.
        //
        SysCtlLDOSleepSet(SYSCTL_LDO_1_15V);
    //    SysCtlLDODeepSleepSet(SYSCTL_LDO_1_10V);
        SysCtlLDODeepSleepSet(SYSCTL_LDO_0_90V);
    
        //
        // Set SRAM to Standby when in Sleep Mode.
        // Set Flash & SRAM to Low Power in Deep-Sleep Mode.
        //
        SysCtlSleepPowerSet(SYSCTL_SRAM_STANDBY);
        SysCtlDeepSleepPowerSet(SYSCTL_FLASH_LOW_POWER | SYSCTL_SRAM_LOW_POWER);
    
        //
        // Call to set initial LED power state.
        //
    //    PowerLEDsSet();
    
        //
        // Loop forever.
        //
        while(1)
        {
            //
            // Handle going into the different sleep modes outside of
            // interrupt context.
            //
            if (g_ui32SleepMode == 1)
            {
                //
                // Go into Sleep Mode.
                //
                MAP_SysCtlSleep();
            }
            else if (g_ui32SleepMode == 2)
            {
                //
                // Go into Deep-Sleep Mode.
                //
                MAP_SysCtlDeepSleep();
            }
        }
    }
    
    

  • Hi,

      I have a few comments. 

    I am currently using the example project for the TI TIVA evaluation board and one of the things I am experimenting with is sleep mode current.  According to the datasheet:

      - The 0.454mA is for deep-sleep mode, not sleep mode. I just want to make sure we are on the same page because you mentioned sleep mode current. 

     - What do you measure for deep sleep mode when you run the stock example without modification?

     - Do you have the debugger disconnected when you run the code? Please make sure you disconnect the debugger. There is below note in the datasheet. 

    Caution – If the Cortex-M4F Debug Access Port (DAP) has been enabled, and the device wakes from
    a low power sleep or deep-sleep mode, the core may start executing code before all clocks to peripherals
    have been restored to their Run mode configuration. The DAP is usually enabled by software tools
    accessing the JTAG or SWD interface when debugging or flash programming. If this condition occurs,
    a Hard Fault is triggered when software accesses a peripheral with an invalid clock.
    A software delay loop can be used at the beginning of the interrupt routine that is used to wake up a
    system from a WFI (Wait For Interrupt) instruction. This stalls the execution of any code that accesses
    a peripheral register that might cause a fault. This loop can be removed for production software as the
    DAP is most likely not enabled during normal execution.
    Because the DAP is disabled by default (power on reset), the user can also power cycle the device. The
    DAP is not enabled unless it is enabled through the JTAG or SWD interface.

    Note: If the Debug Access Port is enabled in Run Mode and attempts to transition into Deep-Sleep
    mode, the device is prevented from entering Deep-Sleep

     - The example uses PWM module and GPIOJ in deep-sleep as indicated in the below lines of code. This mean this example does not have all the peripherals OFF for the lowest current. I will suggest you modify the code to disable all peripherals. Search for 'DeepSleep' and not use any peripherals in deep-sleep mode.   

    //
    // Enable the PWM in Deep-Sleep Mode.
    //
    ROM_SysCtlPeripheralDeepSleepEnable(SYSCTL_PERIPH_PWM0);

    //
    // Enable the Button Port in Sleep & Deep-Sleep Mode.
    //
    ROM_SysCtlPeripheralSleepEnable(SYSCTL_PERIPH_GPIOJ);
    ROM_SysCtlPeripheralDeepSleepEnable(SYSCTL_PERIPH_GPIOJ);

    - Since the processor needs to be woken up by the interrupt to execute the ISR, it is possible that you are measuring a average current, not the deep-sleep current when is CPU is in sleep. If you can disable all peripherals in deep-sleep then I think you will measure a lower current. 

  • Hello Charles,

    Yes I am trying to use Deep Sleep mode.

    If I run the stock example without modification, I measure 7mA in deep sleep mode, but the LDO is set to 1.10V instead of 0.9V in the stock example code and there are several lit LEDs in the stock example as well.

    I am not using the debugger.  The code is just running and I have a current meter set up to measure the current into the microprocessor as described.

    The ISR only occurs when the button is pressed.  I press the button to get the device into Deep Sleep mode and then let it sit while I take a current measurement.

    I noticed a footnote for the current table that states "e. To achieve the lowest possible Deep-Sleep current, one or more wait states must be configured in the MEMTIM0 register. If there are no wait states applied in Run mode, then lowest possible Deep-Sleep current is not achieved."  I think this is the piece that I am missing, but I do not have a good example for how to set one of these wait states.  See screenshot below.

  • Hi Chris,

      Can you please take a look at this post? Amit in this post attached a project that was able to achieve about 1mA in deepsleep on a different development board, not LaunchPad. 

    https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/381027/tm4c129x-and-deep-sleep-apis/1358902#1358902

  • Hello Charles,
    I followed that thread and saw a couple of suggestions that I could try:

    • Changing the frequency set in CtlClockFreqSet to >16MHz so that MEMTIM0 is set.  This did not change my observed Deep Sleep current.
    • Changing the divisor in SysCtlDeepSleepClockConfigSet from "1" to div_64 or div_63.  This also did not change my observed Deep Sleep current.

    I have downloaded the project shared in that thread, but I have not tried it on my device yet.

  • Hi Chris,

      Can you please try Amit's attached project and see if you get a different current measurement? Can you also measure VDDC and what is the voltage? It should provide some hints whether deep-sleep mode entered. 

      I'm on PTO today. Please expect delay. 

  • Hello Charles,

    I managed to get Amit's project running.  When I run Amit's project, VDDC is set to 0.9V and the current draw by the microprocessor is 1.13mA.  This is a lot closer, but still double the datasheet minimum of 0.454mA.

    When I run my project and press the pushbutton to get into Deep Sleep mode, VDDC is set to 0.9V and the current draw from the microprocessor is 5.427mA.

    Amit's code is a step in the right direction, but I am still unable to achieve the minimum current.