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.

TM4C1294NCPDT: Vbat current consumption is too high

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: EK-TM4C1294XL

I have modified TM4C1294 launchpad as so that I removed R39 so I can measure Vbat current consumption. As in related topic was shown, the datasheet shows that current consumption in idle mode should be around 1.3 uA. How ever I'm measuring 4.41 uA with Fluke 289 when MCU is powered of (JP2 removed).

I can't figure out where over 3 uA is vanishing. I checked the hibernation module register settings and I couldn't found out anything there. 

I'm using the hibernation example project as base here. System works and seconds are running when MCU is powered off. 

Here is the code (I couldn't insert it via insert tool for some access denied thing):

//*****************************************************************************
//
// This example demonstrates the different hibernate wake sources. The
// microcontroller is put into hibernation by the user and wakes up based on
// timeout or one of the user inputs. This example also demonstrates the RTC
// calendar function that keeps track of date and time.
//
//*****************************************************************************
int
main(void)
{
uint32_t ui32SysClock, ui32Status, ui32HibernateCount, ui32Len;

//
// Run from the PLL at 120 MHz.
// Note: SYSCTL_CFG_VCO_240 is a new setting provided in TivaWare 2.2.x and
// later to better reflect the actual VCO speed due to SYSCTL#22.
//
ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN |
SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_240), 120000000);

//
// Configure the device pins.
//
PinoutSet(false, false);

//
// Enable UART0
//
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);

//
// Initialize the UART for console I/O.
//
UARTStdioConfig(0, 115200, ui32SysClock);

//
// Enable the hibernate module.
//
SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE);

//
// Initialize these variables before they are used.
//
ui32Status = 0;
ui32HibernateCount = 0;

//
// Check to see if Hibernation module is already active, which could mean
// that the processor is waking from a hibernation.
//
if(HibernateIsActive())
{
//
// Read the status bits to see what caused the wake. Clear the wake
// source so that the device can be put into hibernation again.
//
ui32Status = HibernateIntStatus(0);
HibernateIntClear(ui32Status);

//
// Store the common part of the wake information message into a buffer.
// The wake source will be appended based on the status bits.
//
ui32Len = usnprintf(g_pcWakeBuf, sizeof(g_pcWakeBuf),
"Wake Due To : ");

//
// Wake was due to RTC match.
//
if(ui32Status & HIBERNATE_INT_RTC_MATCH_0)
{
ui32Len = usnprintf(&g_pcWakeBuf[ui32Len],
sizeof(g_pcWakeBuf) - ui32Len, "%s",
g_ppcWakeSource[0]);
}

//
// Wake was due to Reset button.
//
else if(ui32Status & HIBERNATE_INT_RESET_WAKE)
{
ui32Len = usnprintf(&g_pcWakeBuf[ui32Len],
sizeof(g_pcWakeBuf) - ui32Len, "%s",
g_ppcWakeSource[1]);
}

//
// Wake was due to the External Wake pin.
//
else if(ui32Status & HIBERNATE_INT_PIN_WAKE)
{
ui32Len = usnprintf(&g_pcWakeBuf[ui32Len],
sizeof(g_pcWakeBuf) - ui32Len, "%s",
g_ppcWakeSource[2]);
}

//
// Wake was due to GPIO wake.
//
else if(ui32Status & HIBERNATE_INT_GPIO_WAKE)
{
ui32Len = usnprintf(&g_pcWakeBuf[ui32Len],
sizeof(g_pcWakeBuf) - ui32Len, "%s",
g_ppcWakeSource[3]);
}

//
// If the wake is due to any of the configured wake sources, then read
// the first location from the battery-backed memory, as the
// hibernation count.
//
if(ui32Status & (HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_RTC_MATCH_0 |
HIBERNATE_INT_GPIO_WAKE | HIBERNATE_INT_RESET_WAKE))
{
HibernateDataGet(&ui32HibernateCount, 1);
}
}

//
// Configure Hibernate module clock.
//
HibernateEnableExpClk(ui32SysClock);

//
// If the wake was not due to the above sources, then it was a system
// reset.
//
if(!(ui32Status & (HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_RTC_MATCH_0 |
HIBERNATE_INT_GPIO_WAKE | HIBERNATE_INT_RESET_WAKE)))
{
//
// Configure the module clock source.
//
HibernateClockConfig(HIBERNATE_OSC_LOWDRIVE);

//
// Store that this was a system restart not wake from hibernation.
//
ui32Len = usnprintf(g_pcWakeBuf, sizeof(g_pcWakeBuf), "%s",
g_ppcWakeSource[4]);

//
// Set flag to indicate we need a valid date. Date will then be set
// in the while(1) loop.
//
g_bSetDate = true;
}

UARTprintf("%s\n", g_pcWakeBuf);
UARTprintf("Welcome to the Tiva C Series TM4C1294 LaunchPad!\n");
UARTprintf("Hibernation Example\n");
UARTprintf("Type 'help' for a list of commands\n");
UARTprintf("> ");
UARTFlushTx(false);

//
// Configure the hibernate module counter to 24-hour calendar mode.
//
HibernateCounterMode(HIBERNATE_COUNTER_24HR);
//
// Enable RTC mode.
//
HibernateRTCEnable();

struct tm sTime;
HibernateCalendarGet(&sTime);

if (((sTime.tm_sec < 0) || (sTime.tm_sec > 59)) ||
((sTime.tm_min < 0) || (sTime.tm_min > 59)) ||
((sTime.tm_hour < 0) || (sTime.tm_hour > 23)) ||
((sTime.tm_mday < 1) || (sTime.tm_mday > 31)) ||
((sTime.tm_mon < 0) || (sTime.tm_mon > 11)) ||
((sTime.tm_year < 100) || (sTime.tm_year > 199)))
{
UARTprintf("calendar error:\n");
UARTprintf("sec: %i\n", sTime.tm_sec);
UARTprintf("min: %i\n", sTime.tm_min);
UARTprintf("hour: %i\n", sTime.tm_hour);
UARTprintf("mday: %i\n", sTime.tm_mday);
UARTprintf("mon: %i\n", sTime.tm_mon);
UARTprintf("year: %i\n", sTime.tm_year);
UARTprintf("date set to 1.1.2020 - 00:00:00\n");
sTime.tm_sec = 0;
sTime.tm_min = 0;
sTime.tm_hour = 0;
sTime.tm_mday = 1; // month day 1-31
sTime.tm_min = 0; // months since january
sTime.tm_year = 120; // year since 1900
}

uint32_t prev_clk_seconds = sTime.tm_sec;
while (1)
{
HibernateCalendarGet(&sTime);
if (sTime.tm_sec != prev_clk_seconds)
{
UARTprintf("%02u.%02u.20%02u ", sTime.tm_mday, sTime.tm_mon, sTime.tm_year - 100);
UARTprintf("%02u : %02u : %02u\n\n", sTime.tm_hour, sTime.tm_min, sTime.tm_sec);
prev_clk_seconds = sTime.tm_sec;
}
}
}

  • Hi,

      How did you modify the schematic? After you remove JP2 there is no power to the MCU. Do you have a battery that supplies power to the VBAT?

      The LaunchPad appears to have a capacitor on VBAT. However, reading the datasheet, it is mentioned that it may reduce the accuracy of the measurement. 

    'Adding external capacitance to the VBAT supply reduces the accuracy of the low-battery measurement
    and should be avoided if possible. The diagrams referenced in this section only show the connection
    to the Hibernation pins and not to the full system.'

     Do you have another LaunchPad without modification? Can you measure the current across JP2 after you run the hibernate code? What would you measure?

  • I just removed the resistor and now I'm supplying current to Vbat through Ampere meter from 3.3V voltage source. I also noticed the capacitor in Vbat pin, but i'm not worried about the vbat voltage measurement accuracy. Funny that it also mentions in the data sheet that the RC circuit between battery and Vbat is required because of rise time or something..

    And I looked from the schematic that whole MCU is powered through JP2 and that is what I remove, when I simulate power off state. Then the Vbat gets supplied via Fluke and it measures 4.42 uA. And I quite trust for that measurement, because it is high end multimeter. And when the JP2 is closed then Fluke reads 0.00 uA as it should be.

    Basically I just want RTC to work, when tiva is powered off. I'm going to use CR2032 battery here which has around 210 mAh of capacity. with this 4.4uA consumption that only lasts like five years. If the consumption is more like in data sheet the the battery would last easily twice that.

  • Hi,

      I don't know what contributes to the extra 3uA. Do you have another LaunchPad or perhaps your custom board that you can try? Are you getting the same result?

      There is another hibernate example in C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\hibernate\hibernate.c. If you run this example are you getting 4.4uA too?