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.

MSP430F247: Current consumption in Active mode using VLO wit div by 8 clocking and modules off results in Icc = 40uA

Part Number: MSP430F247
Other Parts Discussed in Thread: ENERGYTRACE, MSP-FET, , MSP430G2955

Hopefully someone can give me some insight into what I may be doing wrong.

Testing only the microcontroller in active mode running with the internal VLO with a div/8 clock reported higher than expected current consumption. The measured current was calculated by measuring the voltage drop across a 12k resistor.

The current consumption was expected to be in the order of 10uA however the measured current is always in the order of 40uA.

 

The circuit is constructed using a benchtop power supply a 12kOhm resistor and the MSP430 in active mode. Current is measured by measuring the voltage drop across the resistor and calculating the current. I=(Vs – Vuc)/R.

 

Checking the internal startup of all the uC registers highlights that the internal uC modules start up in either a hold, reset or off state. Eg low power consumption state. Port bits were placed in the output direction with resistor enable turned off as per the recommendation. The SVS is in the off state and the comparator is turned off.

 

The PCB has been ruled out as the source of error as the same code was tested on two different boards and the another the MSP-TS430PM64 programming board. It should be noted that J6 and J7 are not jumpered on the programming board.

 

Unused pins are connected as per the unused pin section in the data sheet. The 32KHz crystal has also been removed to ensure this is not a crystal related problem.

 Here is the unused pin connection list.

Pin name

Pin location

Setting

Vref+

 

Open

Veref+

10

GND

Vref-/Veref-

11

GND

Xin

8

Vcc

Xout

 

Open

XT2in

53

Gnd

XT2Out

 

Open

Px0 to Px.7

 

Outputs driven high also tried low

nRST/NMI

47kOhm with10nF pulldown

 

Test

 

Open

TDO

 

Open

TDI

 

Open

TMS

 

Open

TCK

 

Open

Here is the test code.


#include <msp430.h> #define WDTSOURCE 0x04 // tACLK * 2^15 = 1 s @ 32768 Hz int main(void) { __disable_interrupt(); WDTCTL = WDTPW | WDTHOLD | WDTCNTCL | WDTSOURCE; IE1 = 0; BCSCTL1 = 0xb0; // XT2 off, LFXT1 low freq, ACLK/8, RSELx=0 BCSCTL2 = 0xfe; // LFXT1CLK for MCLK and SMCLK, MCLK/8, SMCLK LFXT1CLK, SMCLK/8 BCSCTL3 = 0xe4; //********** test VLOCLK instead of 32K LFXT1 Hardware_CLOCK_CONFIG; DCOCTL = 0x00; // DCOx=0, MODx=0 __bis_SR_register(SCG0 | SCG1); // DCO and SMCLK off /* P1SEL = 0; P1DIR = 0; P1OUT = 0; P1REN = 0xff; P1IFG = 0; P2SEL = 0; P2DIR = 0; P2OUT = 0; P2REN = 0xff; P2IFG = 0; P3SEL = 0; P3DIR = 0; P3OUT = 0; P3REN = 0xff; P4SEL = 0; P4DIR = 0; P4OUT = 0; P4REN = 0xff; P5SEL = 0; P5DIR = 0; P5OUT = 0; P5REN = 0xff; P6SEL = 0; P6DIR = 0; P6OUT = 0; P6REN = 0xff; */ P1SEL = 0; P1DIR = 0xff; P1OUT = 0xff; P1REN = 0; P1IFG = 0; P2SEL = 0; P2DIR = 0xff; P2OUT = 0xff; P2REN = 0; P2IFG = 0; P3SEL = 0; P3DIR = 0xff; P3OUT = 0xff; P3REN = 0; P4SEL = 0; P4DIR = 0xff; P4OUT = 0xff; P4REN = 0; P5SEL = 0; P5DIR = 0xff; P5OUT = 0xff; P5REN = 0; P6SEL = 0; P6DIR = 0xff; P6OUT = 0xff; P6REN = 0; /* ADC12CTL0 = 0; ADC12CTL1 = 0; TACTL = 0; TBCTL = 0; UCA0CTL1 = 0x01; // hold in reset UCA1CTL1 = 0x01; SVSCTL = 0; */ P5SEL &= ~0x01; P5DIR |= 0x01; for (;;) { // P5OUT ^= 0x01; } return 0; }
  • Hello Rudy,

    Are you measuring the power consumption during an active debug session? This will cause higher power consumption (search the forum for related threads). Also, I would recommend using the EnergyTrace feature supported by the MSP-FET and CCS to measure the power consumption more accurately.

    In your code above, I see that you're toggling P5.0. If this is toggling an LED, this could be why you're seeing higher-than-expected power consumption. Comment out the P5SEL and P5DIR code above the for() loop and replace it with a while(1) for measuring the current.

    MSP430™ Advanced Power Optimizations: ULP Advisor™ Software and EnergyTrace™ Technology

    Regards,

    James

    MSP Customer Applications

  • Thanks for your reply James.

    I've tried without the led toggle and it does the same thing.

    I also forgot to mention that JTAG is not connected as the code was written to flash.  

    MSP430F247 is rev G.  I have also tried multiple uC just to be sure that they were not damaged.

    But still the high current.

  • Thanks for checking on the toggle. First, I don't like the 12kOhm resistor used for measuring the current flow. Why? Well, the device will start up in Active mode by default. According to the datasheet, the current consumption with a supply voltage of 2.2V at 1MHz is 270uA. Now, let's calculate the maximum current that can flow through the 12kOhm resistor. At 2.2V, the max current is only 183.3uA. Thus, you could be starving the device and it's not able to power up correctly before entering a low power mode (LPM).

    Here's what I would do. Using your target board and your MSP-FET, configure the target board jumpers to allow the MSP-FET to power the target board. Remove all unnecessary jumpers including JTAG jumpers and the jumper for the LED (if applicable), etc. Using EnergyTrace in CCS, measure the power consumption. Let me know what this value is.

    Regards,

    James

    MSP Customer Applications
  • Hi James.

    I didn't mention that I do have a switch in parallel with the resistor, so I do short the resistor for a few seconds before I switch the resistor short out of the circuit.

    I just tried it again this morning with a longer delay between switching in the resistor and taking a measurement.  My last measurement was 30.5uA but temperature has changed.

    This is not different to before.  The 40uA I mentiion in the title included the quiescent current of a regulator that I no longer have in the circuit.

    I am expecting something in the order of < 10uA.  Is this just incorrect.  I did notice that on the MSP430G2955 datasheet the Active power specifications have been reduced to only 1 entry.

    Also I can't run Energytrace as I only have the MSP430FETUIF.  I can see my registers though and they do look pretty.

    I checked there configurations and it is as expected.

     

     

  • Rudy Lopez said:
    I didn't mention that I do have a switch in parallel with the resistor, so I do short the resistor for a few seconds before I switch the resistor short out of the circuit.

    This is a strange implementation. Is there a break in power when you do the switch? Rather than switching, I'd just use a larger resistor. Again, the 12kOhm resistor could be limiting the Active Mode current.

    Rudy Lopez said:

    I just tried it again this morning with a longer delay between switching in the resistor and taking a measurement.  My last measurement was 30.5uA but temperature has changed.

    This is not different to before.  The 40uA I mentiion in the title included the quiescent current of a regulator that I no longer have in the circuit.

    So the quiescent current of the regulator could have been 10uA. Disconnect or remove everything else around the MCU if you're trying to accurately measure the MCU's power consumption. Otherwise, what you measure is not what the MCU is consuming, so you'll never be able to match the numbers in the datasheet.

    Rudy Lopez said:
    I am expecting something in the order of < 10uA.  Is this just incorrect.  I did notice that on the MSP430G2955 datasheet the Active power specifications have been reduced to only 1 entry.

    Why are you referring to the MSP430G2955 datasheet when you're using the MSP430F247? On page 31 in the MSP430F247's datasheet, the third row seems to be the closest scenario to yours. However, according to Footnote 2, an external 32kHz crystal is used as the ACLK, SMCLK, and MCLK source, not VLO. However, the VLO should consume less power than an external crystal. Depending on your test conditions, supply voltage, and temperature, you should get current consumption numbers around those provided or slightly lower.

    Rudy Lopez said:
    Also I can't run Energytrace as I only have the MSP430FETUIF.

    I would highly recommend using the MSP-FET, so that you can use EnergyTrace, especially when you start trying to measure the current consumption in Low Power Modes (LPMs). When using LPMs in your code, a multimeter can only average the current consumption across all modes and won't be an accurate representation of your actual current consumption.

    Regards,

    James

    MSP Customer Applications

  • Just for clarification.

    Regulator is not in the circuit just a resistor and switch in parallel then series connect to the uC.
    Vcc = 3.3 Volts
    Idraw measured is 30-40 mA
    Pins connected as per unused pin section on the data sheet.
    Code used is as per the previous message.
    Using VLO, but having said that I did try the 32768 crystal and the same amount of current is consumed.
    Code sets up for VLO.

    Referring to the 247 datasheet active modes. The comment about the 2955 datasheet was only an observation as the active modes information is mostly omitted.

    Don't have MSP430FET only the MSP430FETUIF. Will buy one but this will take some time. Average current measurement should be just fine as I place the uC in that mode and leave it there.

    When measuring the code is being loaded into the MSP the JTAG is then removed and the power supply is cycled so it starts with the newly loaded code. Prior to power cycling I sort the resistor due to the micro starting in a mode that consumes more current and I wait a few seconds so that the uC enters the mode where VLO is clocking and the clocks are all clk/8. I then switch to the resistor and measure the voltage across the resistor. From this I calculate the current.

    Multimeter impedance is 10Meg ohm. I have also tried using 2 MM in series each measuring its portion of the voltage. This ensures that the measuring devices internal impedance is 20 Meg ohm. The voltage measured is still the same and the current is still the same.

    I have changed the code so that it resembles exactly the SCG0 and SCG1, OSCOFF settings that match active mode 3. I expect current should be <4.7uA but I get much higher than this. This was the first thing I did to match the data sheet. Using 32k xtal. This did not match the datasheet. So to remove the effect of the xtal and the layout I changed to the VLO which should consume less power.

    The led toggle that is in the code was only to see that the uC was operating correctly and it is. The led toggle was removed from the code and I think the code you see has it commented out if its not it is now.


    I have tried multiple MSP430F247's all are rev G. The CPU setting in the compiler is set to 19 for the errata.

    On page 31 of the latest data sheet the active mode suggests that 4.7uA should be that which the uC consumes. I don't get anywhere near this.

    I have tried the current measurement on 2 boards one that we produce and the MSP-TS430PM64. Made all the mods on the TI board as per requirement for unused pins.

    Still the same.

    Have you tried to reproduce the results. ? Am I just doing something wrong, coz If I am I cant see it.
  • Hello Rudy,

    Initially, you mentioned that you were seeing 40uA but now you're saying it's 40mA. Also, I've recommended that you use a resistor with a lower resistance (e.g. 1kOhm) several times now. I'm not sure how much more I can help here.

    Try programming the following LPM3 code example (without making any changes) and measure the current consumption with a 1kOhm resistor (don't switch between the short).

    msp430x24x_lpm3_vlo.c

    /* --COPYRIGHT--,BSD_EX
     * Copyright (c) 2012, 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.
     *
     *******************************************************************************
     * 
     *                       MSP430 CODE EXAMPLE DISCLAIMER
     *
     * MSP430 code examples are self-contained low-level programs that typically
     * demonstrate a single peripheral function or device feature in a highly
     * concise manner. For this the code may rely on the device's power-on default
     * register values and settings such as the clock configuration and care must
     * be taken when combining code from several examples to avoid potential side
     * effects. Also see www.ti.com/grace for a GUI- and www.ti.com/msp430ware
     * for an API functional library-approach to peripheral configuration.
     *
     * --/COPYRIGHT--*/
    //******************************************************************************
    //   MSP430x24x Demo - Basic Clock, LPM3 Using WDT ISR, VLO ACLK
    //
    //   Description: This program operates MSP430 normally in LPM3, pulsing P1.0
    //   ~ 6 second intervals. WDT ISR used to wake-up system. All I/O configured
    //   as low outputs to eliminate floating inputs. Current consumption does
    //   increase when LED is powered on P1.0. Demo for measuring LPM3 current.
    //   ACLK = VLO/2, MCLK = SMCLK = default DCO ~1.045Mhz
    //
    //                MSP430F249
    //             -----------------
    //         /|\|              XIN|-
    //          | |                 |
    //          --|RST          XOUT|-
    //            |                 |
    //            |             P1.0|-->LED
    //
    //   B. Nisarga
    //   Texas Instruments Inc.
    //   September 2007
    //   Built with CCE Version: 3.2.0 and IAR Embedded Workbench Version: 3.42A
    //******************************************************************************
    #include <msp430.h>
    
    volatile unsigned int i;
    
    int main(void)
    {
      // interval: [VLO_freq/(2*32768)] ~ 1/6Hz ~ 6 second interval
      WDTCTL = WDT_ADLY_1000;                   // WDT 1s*4 interval timer
      BCSCTL1 |= DIVA_1;                        // ACLK/2
      BCSCTL3 |= LFXT1S_2;                      // ACLK = VLO
      IE1 |= WDTIE;                             // Enable WDT interrupt
      P1DIR = 0xFF;                             // All P1.x outputs
      P1OUT = 0;                                // All P1.x reset
      P2SEL = 0;                                // All P2.x GPIO function
      P2DIR = 0xFF;                             // All P2.x outputs
      P2OUT = 0;                                // All P2.x reset
      P3DIR = 0xFF;                             // All P3.x outputs
      P3OUT = 0;                                // All P3.x reset
      P4DIR = 0xFF;                             // All P4.x outputs
      P4OUT = 0;                                // All P4.x reset
      P5DIR = 0xFF;                             // All P5.x outputs
      P5OUT = 0;                                // All P5.x reset
      P6DIR = 0xFF;                             // All P6.x outputs
      P6OUT = 0;                                // All P6.x reset
    
      while(1)
      {
        __bis_SR_register(LPM3_bits + GIE);     // Enter LPM3, enable interrupts
        P1OUT |= 0x01;                          // Set P1.0 LED on
        for (i = 20000; i > 0; i--);            // Delay
        P1OUT &= ~0x01;                         // Clear P1.0 LED off
      }
    }
    
    #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
    #pragma vector=WDT_VECTOR
    __interrupt void watchdog_timer (void)
    #elif defined(__GNUC__)
    void __attribute__ ((interrupt(WDT_VECTOR))) watchdog_timer (void)
    #else
    #error Compiler not supported!
    #endif
    {
      __bic_SR_register_on_exit(LPM3_bits);     // Clear LPM3 bits from 0(SR)
    }

    When you get the MSP-FET, please let me know what you measure with EnergyTrace and the target board.

    Regards,

    James

    MSP Customer Applications

**Attention** This is a public forum