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.

MSP430 Low Power Consumption

Other Parts Discussed in Thread: MSP430FG439, MSP430F5438

Hello,

 

I am programming a MSP430FG439 which is in a board with an FPGA IGLOO of Actel. When I put the microcontroller in the low power mode there isn't any change in the consumption of the board. However, I appreciate that the MSP430FG439 is in the low power mode because the clocks become disabled. I have tried with a simple program like this :

#include  <msp430xG43x.h>

void main(void)
{  

  WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer
 
 
  P1SEL |= 0x32;                           // sel=1 para el aclk para que sea funcion del modulo periferico (P1.5)
  TACTL= MC_1;                             


    P1DIR = 0xFF;
  P2DIR = 0xFF;
  P3DIR = 0xFF;
  P4DIR = 0x00;
  P5DIR = 0xFF;
  P6DIR = 0xFF;

   P1OUT = 0x00;
  P2OUT = 0x00;
  P3OUT = 0x00;
 P4OUT = 0x00;
  P5OUT = 0x00;
  P6OUT = 0x00;

 _BIS_SR(LPM4_bits + GIE);              // Enter LPM3 
}

I guess that even when the program is so simple I should appreciate a change in the consumption

Thanks

  • Hello,

    If you are simply looking to make a LPM current measurement please use a code example from the TI website.

    http://focus.ti.com/mcu/docs/mcuflashtools.tsp?sectionId=95&tabId=1538&familyId=342

    Try fet430_lpm3.c from the FG43x zip file.

    Regards,

    Priya

  • Hello,

    First of all, I have slept the FPGA and I appreciate a fall in the current from 50 mA to 2mA. Then I have tried with this code  ( fet430_lpm3.c ) but the current measurement remains at the same value (2mA) and even icreases its value due to the fact that the I/O ports of the MSP430FG439 are set as an output with the code that you suggested me.

    I can't understand why when I put the micro in low power mode and I notice that the clocks become disabled nothing happens in the value of the current.

    I don't think there is any kind of conflict between the ports of the FPGA and the microcontroller.

    Thank you in advanced for your help,

    Mayid

     

  • Hello Mayid,

    to tell what's happening, a lot more information is neede, the exact circuit, supply voltages etc.

    Looking at ma 5438 datasheet, the processor consumes ~6mA on full operation with 16MHz. There your whole board with 2mA is well blow that. I guess your processor isn't that different.

    Then how do you measure power consumption? Can you detect fractions of a mA for certain? Most handheld ampere meters show fantasy values around 1mA.

    Then where do you measure? And what? Many voltage regulators consume a few mA just for doing nothing.

    Another thing is the ports. Besides drawing perhaps current if set as inputs wihtout pullup (due to input oscillation), you may not attach any voltage to the port pins that exceeds VccMSP. So if you drive the Atmel e.g. with 5V, its outputs (even if only with pullups, not driven) might cause additional current flow. While this does no damage as long as the maximum current of 2mA per pin isn't exceeded, it causes a way greater power consumption than listed in the datasheet. Also, this current might increase VccMSP (depending on the used voltage regulator and the total power consumption off of VccMSP), leadign to an increased processor power consumption.

    There are so many ways to make it wrong...

  • Hello again,

     

    The fact is that I also have the MSP430F5438 experiment board and when I put the micro in Low power mode ( with the code that Texas instruments provides) I don't appreciate any change in the current either ( it stays at 1.08mA and if I configure the I/O ports in a good manner I can achieve 0.20mA). Therefore I think that the problem could stem from any configuration in the IAR embedded workbench or maybe I am not measuring the current properly (but I am doing the same procedure with the FPGA and the values that I see are good). I am using a source of electricity and its possitive signal goes through and voltmeter and then feeds the board. The GND of the board is connected to the negative port of the fource of electricity.

    I have also tried with a Oscilloscope in order to contrast bost measurements.

    When I am in the debugger of the IAR and I go step by step , after entering in the low power mode if I try to do anything else the following message appears: "warning CPU is off (low power mode) and interrupts are disabled" so that it is obvious that I am in the low power mode.

     

    Thank you¡¡¡

    Mayid

  • Okay, let's go deeper into this.

    With the code you posted above, the processor will fall asleep in microsecods after a reset. So what was the code you compared the result with? A different program with a while(1) loop in the main? You should see a difference then.

    Anyway, with the default DCO setting of ~0.25..0.75MHz, the processor already runs on very low speed and low consumption (~0.3mA). So the ports made up for the biggest part of the current.

    Do you have the FET still attached while measuring? Maybe the current is drawn through the JTAG pins.

    I dimly remember reading somewhere that a clock wasn't disabled in LMP when it was assigned to this or that hardware module. Scanning the errata sheet could reveal something. Also, you can try seting MCLK, SMCLK and ACLK to using VLOCLK, so DCOCLK can be disabled.

    I must admit that I never tried to power-down any of our MSPs that far. As most of our projects are energy meters (which requires being conencted to a live wire) a power consumption of a few milliamperes never was a problem. :) And customers want blinking LEDs, so they can 'see' that the device is 'running'. (actually, I'm the only one who can say by the blinking LEDs whether things are running or something is wrong)

     

     

  • Yes, if the FET is connected it will be drawing some current.  I am working on a project now that has a CC430 down in the single digit uA, but the FET must be disconnected to take the measurement.  Otherwise it will easily draw in the mA range when the target board is externally powered.  You will also have to make sure to not leave the JTAG pins floating to get an accurate measurement.

  • I am using a crystal of 32KHz.

    The JTAG doesn't have anything to do with the current measurement because I am measuring the current in the entry of the Micro, so that when I disconnect the JTAG the current remains equal.

    On the other hand, I have checked the registers of the micro in the debugger of IAR and after entering  the LPM4 they acquire the following values :

    SCG1=1

    SCG0=1

    OscOff = 1

    And this is correct, so I enter  the Low power mode properly.

    I haven' t tried to source the MCLK, SMCLK and ACLK by the VLOCLK, but I think it wouldn't change anything because with the LPM4 all this clocks become disabled.

    Thanks

  •  

    I guess you got it wrong. If the JTGA hardware is connected to the MSP, some current can flow through the JTAG pins It' seven possible that the JTAG circuitry is still active as it is independent of the processor core. (as you could see, the debugger told you that the processor is off rather than telling you that it didn't find a processor, so JTAG was still active). But as you said you didn't see any difference with JTAG attached and (physically) detached... (I'm sure you made a power-cycle after disconnecting it?)

    I didn't supect that you're powering the JTAG interface from the board and measuring its supply current. (it would be far beyond 0.2mA)

    Maybe the crystal is still active in your LPM. This could easily cause the 0.2mA. OSCOFF=1 is only accepted when LFXT1CLK is not used for MCLK or SMCLK. Also SCG1=1 will only turn off DCOCLK if it isn't currently used for MCLK or SMCLK.

    Also (as this won't apply in your example), the LPMs are not entered properly if MCLK < ACLK (UCS2 erratum)  and the clock source of any active but idle USCI module is not turned off in LPM3/4 (UCS6)

**Attention** This is a public forum