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-TM4C123GXL: Hibernation mode is drawing too much current

Part Number: EK-TM4C123GXL
Other Parts Discussed in Thread: TM4C123GH6PM

Hello

I’m trying to get hibernation working properly on the EK-TM4C123GXL eval board.  I can successfully build and run the hibernation example in ‘C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c123gxl\hibernate’, but the CPU still drains ~22mA while the example code is running.

I disabled the UART portion of the code and that dropped me down to ~5mA.

I enabled VDD3ON mode via HibernateGPIORetentionEnable( ) since the eval board doesn’t use the HIB pin to turn off the power to the VDD power pins while hibernating.  According to the documentation, VDD3ON mode should internally remove power from everything except the GPIO pins and the hibernate module.  Unfortunately it didn’t significantly reduce my ~5mA current drain.

Do you know why the board is drawing so much power?  Can it only achieve the super low hibernation currents if I remove the voltage from the VDD pins?

Thank you
Scott Wild

  • Hi Scott,

      You are correct. To achieve the lowest current, the VDD must be turned off with Vbat sourced from battery. Normally, the HIBn (hibernate request) signal is connected to the voltage regulator to turn off the VDD to MCU. However, on LaunchPad, HIB is left unconnected and VBAT is connected to the VDD. When you put MCU in hibernate mode with VDD3ON, the I/Os still consume current in order to retain the I/O states. If you look at the current consumption in the datasheet, the VDD3ON mode will consume about 4.5mA at room temp which is close to what you measure. 

    2.2.2 Hibernate
    The Tiva C Series LaunchPad provides an external 32.768-kHz crystal (Y1) as the clock source for the
    TM4C123GH6PM Hibernation module clock source. The current draw while in Hibernate mode can be
    measured by making some minor adjustments to the Tiva C Series LaunchPad. This procedure is
    explained in more detail later in this section.


    The conditions that can generate a wake signal to the Hibernate module on the Tiva C Series LaunchPad
    are waking on a Real-time Clock (RTC) match and/or waking on assertion of the WAKE pin. (1) The second
    user switch (SW2) is connected to the WAKE pin on the microcontroller. The WAKE pin, as well as the
    VDD and HIB pins, are easily accessible through breakout pads on the Tiva C Series LaunchPad. See the
    appended schematics for details.

    There is no external battery source on the Tiva C Series LaunchPad Hibernation module, which means
    the VDD3ON power control mechanism should be used. This mechanism uses internal switches to
    remove power from the Cortex-M4 processor as well as to most analog and digital functions while
    retaining I/O pin power.


    To measure the Hibernation mode current or the Run mode current, the VDD jumper that connects the 3.3
    V pin and the MCU_PWR pin must be removed. See the complete schematics (appended to this
    document) for details on these pins and component locations. An ammeter should then be placed
    between the 3.3 V pin and the MCU_PWR pin to measure IDD (or IHIB_VDD3ON). The TM4C123GH6PM
    microcontroller uses VDD as its power source during VDD3ON Hibernation mode, so IDD is the Hibernation
    mode (VDD3ON mode) current. This measurement can also be taken during Run mode, which measures
    IDD the microcontroller running current.

    For achieving the lowest current consumption please refer to the recommended example shown in the datasheet and also below. 

  • Whoops.  I didn't look close enough at the current consumption table you showed me.  It actually says that the device should only drain ~4.5uA (not mA) with VDD and VDDA at 3.3V.

  • Hi Scott,

      Sorry, I meant 4.5uA for VDD3ON. 

  • So this takes me back to my original question -- Why am I seeing ~5mA current draw while hibernating when I should only be seeing ~5uA?  Is there something else I need to add to the hibernation example code to achieve this super low current draw?

  • Hi Scott,

      The example uses RTC to wake from hibernate every 5 seconds. You may be measuring an average current that includes both run and hibernate modes.  Can you try to increase the RTC wakeup time so that it is in hibernate mode for a longer duration? Will you see the current drop? You also enable WAKEn pin as the wake source and use WAKEn to generate an interrupt instead of using RTC to interrupt. This way you can put the device in hibernate mode until you manually press the WAKEn pin. 

  • Hi Charles

    I put a 10Ω shunt resistor across the current measurement jumper pins and saw a pretty consistent 50mV average across the resistor, so there isn't any significant fluctuation of the current.

  • Hi Scott,

     Can you post your modified code?

  • Hi Charles

    Here you go.  It's just the original TI sample code with the following changes:

    • Switch to low frequency internal oscillator to reduce power
    • Remove UART stuff to reduce power
    • Switch to VDD3ON mode via MAP_HibernateGPIORetentionEnable( )

    I included the .git folder so you can see what changes I made to the original code.

    hibernate.zip

    Thank you
    Scott

  • Hi Scott,

      At first, I ran the stock hibernate example and I was measuring about 4mA using Fluke 115 DMM. I read the datasheet again and it has the below notes. 

    7.3.9 Initiating Hibernate
    Hibernate mode is initiated when the HIBREQ bit of the HIBCTL register is set. If a wake-up condition
    has not been configured using the PINWEN or RTCWEN bits in the HIBCTL register, the hibernation
    request is ignored. If a Flash memory write operation is in progress when the HIBREQ bit is set, an
    interlock feature holds off the transition into Hibernate mode until the write has completed. In addition,
    if the battery voltage is below the threshold voltage defined by the VBATSEL field in the HIBCTL
    register, the hibernation request is ignored.

      I inserted the below line and the current drops significantly. Can you please try?

    HibernateWakeSet(HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RESET | HIBERNATE_WAKE_RTC);

  • Hi Charles

    Thank you for the suggestion.  This did reduce the current to ~700uA, so it is a step in the right direction, but it is still nowhere near the advertised super low current drain.  Also, the Blue LED blink pattern changes from a toggle every five seconds to a quick blink every five seconds.

    A little more background:  We are currently selling a battery-powered spectrometer product using a Tiva processor, but we didn't put a 32kHz crystal on the board so we can only go into deep sleep mode when the spectrometer is turned off.  This causes a current drain of ~1mA when powered off.  Since our product is used in schools, it can be put on a shelf for several weeks between uses.  This results in the battery being drained when the customer wants to use it next.

    We want to put a 32kHz crystal on the next board rev so we can go into hibernate mode with super low current drain, so I am trying to prove out the concept on the Tiva Launch Pad board.  ~700uA power drain is better than before, but it is still too close to the ~1mA current drain that deep sleep mode currently gives us.

    Any ideas how to bring down the hibernation current drain any further?  I'd be happy with 100uA.

    Thank you
    Scott

  • Hi Scott,

      Can you remove code that toggles LED? I think LED could be drawing current too with VDDON enabled. Does it make a difference?

  • Hi Charles

    Yes that fixed it!  I forgot about the base current of the LED's switching transistor.  I got too used to FETs and their zero gate current.

    Thank you!
    Scott