EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Unreasonably high power consumption

Started by Omer Yalhi August 7, 2003
I have a small circuit with MSP430F449 and a small test code that
initializes and sleeps that is all.  The current consumption is more
than 10 mA!!! (I have an analog tester, with max of 10mA).  The chip is
in sleep mode, how could this be possible?  The other components I have
are max3221, which is in auto shutdown mode with 15uA, SST EEprom with
1uA standby current, TSP7201 (which not powered but it is there), and an
LCD with all the segments off.  The total consumption should not be more
then 20 or 30 uA but it is not.  Below is the code, all pins are outputs
and set to 0.

p.s. there are no leds on the board.

void main(void)
{
 InitializeHardware();
 InitializeValues();            // initializes values to their default
value

 while(1) {              // this is the forever loop
  if(ulPulseCounter > 0) {         // if we have unprocessed pulses
   while(ProcessPulse());         // process all pulses
  }

  _BIS_SR(CPUOFF | SCG1 | SCG0);        // sleep
 }
}

void InitializeHardware(void)
{
 WDTCTL = WDTHOLD | WDTPW;          // Stop watchdog.
 TACTL = TASSEL0 | TACLR;          // ACKL for TIMER_A
 CCTL0 |= CCIE;             // Enable CCR0 interrupt
 CCR0 = 0x7FFF;             // Load CCR0 with 32,767
 TACTL |= MC0;             // Start TA in "up to CCR0" mode

 // Set FLL.
 FLL_CTL0 |= XCAP14PF; 
    BTCTL = BT_fLCD_DIV64 + BTDIV + BTIP1 + BTIP0;     // 125ms
interrupt

 P1DIR = 0xFC;             // p1.0 ve p1.1 -> input
 P1IES = 0x02;             // interrupt on low to high transition
 P1IFG = 0x00;             // clear port1 interrupts
 P1IE  = 0x02;             // enable interrupt on pin P1IE.1

 P2DIR = 0xFF;
 P2OUT = 0x00;
 
 P1SEL = 0x30;
 P2SEL = 0x00;

 P3OUT = 0X00;
 P4OUT = 0X00;
 P5OUT = 0X00;
 P6OUT = 0X00;

 P3DIR = 0XFF;
 P4DIR = 0XFF;
 P5DIR = 0XFF;
 P6DIR = 0XFF;

 //_EINT();                // do not enable interrupts for test purposes
}

Beginning Microcontrollers with the MSP430

Without seeing the circuit it is hard to know if perhaps the current
consumption is happening outside the device. You might try setting all the
connected output pins to input to see if there may be an external
contention.
 

Russ Troxel 
Analog/Digital Design Engineer 

Megger 
4271 Bronze Way 
Dallas, Texas 75237-1088 
Phone: 214.330.3242 (Direct) 
Phone: 800.723.2861 Ext. 3242 (Toll Free) 
FAX: 214.331.7373 
e-mail: russell.troxel@russ... 
URL: www.megger.com 

The information contained in this electronic mail message is confidential.
It is intended solely for the use of the individual or entity to who it is
addressed and others authorized to receive it.  If the reader of this
message is not the intended recipient, you are hereby notified that any use,
copying, dissemination or disclosure of this information is strictly
prohibited.

-----Original Message-----
From: Omer Yalhi [mailto:oyalhi@oyal...]
Sent: Thursday, August 07, 2003 9:14 AM
To: msp430@msp4...
Subject: [msp430] Unreasonably high power consumption


I have a small circuit with MSP430F449 and a small test code that
initializes and sleeps that is all.  The current consumption is more
than 10 mA!!! (I have an analog tester, with max of 10mA).  The chip is
in sleep mode, how could this be possible?  The other components I have
are max3221, which is in auto shutdown mode with 15uA, SST EEprom with
1uA standby current, TSP7201 (which not powered but it is there), and an
LCD with all the segments off.  The total consumption should not be more
then 20 or 30 uA but it is not.  Below is the code, all pins are outputs
and set to 0.

p.s. there are no leds on the board.

void main(void)
{
InitializeHardware();
InitializeValues();            // initializes values to their default
value

while(1) {              // this is the forever loop
  if(ulPulseCounter > 0) {         // if we have unprocessed pulses
   while(ProcessPulse());         // process all pulses
  }

  _BIS_SR(CPUOFF | SCG1 | SCG0);        // sleep
}
}

void InitializeHardware(void)
{
WDTCTL = WDTHOLD | WDTPW;          // Stop watchdog.
TACTL = TASSEL0 | TACLR;          // ACKL for TIMER_A
CCTL0 |= CCIE;             // Enable CCR0 interrupt
CCR0 = 0x7FFF;             // Load CCR0 with 32,767
TACTL |= MC0;             // Start TA in "up to CCR0" mode

// Set FLL.
FLL_CTL0 |= XCAP14PF; 
    BTCTL = BT_fLCD_DIV64 + BTDIV + BTIP1 + BTIP0;     // 125ms
interrupt

P1DIR = 0xFC;             // p1.0 ve p1.1 -> input
P1IES = 0x02;             // interrupt on low to high transition
P1IFG = 0x00;             // clear port1 interrupts
P1IE  = 0x02;             // enable interrupt on pin P1IE.1

P2DIR = 0xFF;
P2OUT = 0x00;

P1SEL = 0x30;
P2SEL = 0x00;

P3OUT = 0X00;
P4OUT = 0X00;
P5OUT = 0X00;
P6OUT = 0X00;

P3DIR = 0XFF;
P4DIR = 0XFF;
P5DIR = 0XFF;
P6DIR = 0XFF;

//_EINT();                // do not enable interrupts for test purposes
}



 
<http://rd.yahoo.com/M$4522.3656190.4921519.1261774/D=egroupweb/S050053
78:HM/A95053/R=0/SIG4mh1h7k/*http://ashnin.com/clk/muryutaitakenattogy
o?YH656190&yhad95053> Click Here!	
 
<http://us.adserver.yahoo.com/l?M$4522.3656190.4921519.1261774/D=egroupmai
l/S=:HM/A95053/randU4531816> 	

.



">http://docs.yahoo.com/info/terms/> . 







Make sure that all the unused input pins are pulled
up/down using a high value Resistor.

-Sumukh
--- "Troxel, Russell" <Russell.Troxel@Russ...>
wrote:
> Without seeing the circuit it is hard to know if
> perhaps the current
> consumption is happening outside the device. You
> might try setting all the
> connected output pins to input to see if there may
> be an external
> contention.
>  
> 
> Russ Troxel 
> Analog/Digital Design Engineer 
> 
> Megger 
> 4271 Bronze Way 
> Dallas, Texas 75237-1088 
> Phone: 214.330.3242 (Direct) 
> Phone: 800.723.2861 Ext. 3242 (Toll Free) 
> FAX: 214.331.7373 
> e-mail: russell.troxel@russ... 
> URL: www.megger.com 
> 
> The information contained in this electronic mail
> message is confidential.
> It is intended solely for the use of the individual
> or entity to who it is
> addressed and others authorized to receive it.  If
> the reader of this
> message is not the intended recipient, you are
> hereby notified that any use,
> copying, dissemination or disclosure of this
> information is strictly
> prohibited.
> 
> -----Original Message-----
> From: Omer Yalhi [mailto:oyalhi@oyal...]
> Sent: Thursday, August 07, 2003 9:14 AM
> To: msp430@msp4...
> Subject: [msp430] Unreasonably high power
> consumption
> 
> 
> I have a small circuit with MSP430F449 and a small
> test code that
> initializes and sleeps that is all.  The current
> consumption is more
> than 10 mA!!! (I have an analog tester, with max of
> 10mA).  The chip is
> in sleep mode, how could this be possible?  The
> other components I have
> are max3221, which is in auto shutdown mode with
> 15uA, SST EEprom with
> 1uA standby current, TSP7201 (which not powered but
> it is there), and an
> LCD with all the segments off.  The total
> consumption should not be more
> then 20 or 30 uA but it is not.  Below is the code,
> all pins are outputs
> and set to 0.
> 
> p.s. there are no leds on the board.
> 
> void main(void)
> {
> InitializeHardware();
> InitializeValues();            // initializes values
> to their default
> value
> 
> while(1) {              // this is the forever loop
>   if(ulPulseCounter > 0) {         // if we have
> unprocessed pulses
>    while(ProcessPulse());         // process all
> pulses
>   }
> 
>   _BIS_SR(CPUOFF | SCG1 | SCG0);        // sleep
> }
> }
> 
> void InitializeHardware(void)
> {
> WDTCTL = WDTHOLD | WDTPW;          // Stop watchdog.
> TACTL = TASSEL0 | TACLR;          // ACKL for
> TIMER_A
> CCTL0 |= CCIE;             // Enable CCR0 interrupt
> CCR0 = 0x7FFF;             // Load CCR0 with 32,767
> TACTL |= MC0;             // Start TA in "up to
> CCR0" mode
> 
> // Set FLL.
> FLL_CTL0 |= XCAP14PF; 
>     BTCTL = BT_fLCD_DIV64 + BTDIV + BTIP1 + BTIP0;  
>   // 125ms
> interrupt
> 
> P1DIR = 0xFC;             // p1.0 ve p1.1 -> input
> P1IES = 0x02;             // interrupt on low to
> high transition
> P1IFG = 0x00;             // clear port1 interrupts
> P1IE  = 0x02;             // enable interrupt on pin
> P1IE.1
> 
> P2DIR = 0xFF;
> P2OUT = 0x00;
> 
> P1SEL = 0x30;
> P2SEL = 0x00;
> 
> P3OUT = 0X00;
> P4OUT = 0X00;
> P5OUT = 0X00;
> P6OUT = 0X00;
> 
> P3DIR = 0XFF;
> P4DIR = 0XFF;
> P5DIR = 0XFF;
> P6DIR = 0XFF;
> 
> //_EINT();                // do not enable
> interrupts for test purposes
> }
> 
> 
> 
>  
>
<http://rd.yahoo.com/M$4522.3656190.4921519.1261774/D=egroupweb/S050053
>
78:HM/A95053/R=0/SIG4mh1h7k/*http://ashnin.com/clk/muryutaitakenattogy
> o?YH656190&yhad95053> Click Here!	
>  
>
<http://us.adserver.yahoo.com/l?M$4522.3656190.4921519.1261774/D=egroupmai
> l/S=:HM/A95053/randU4531816> 	
> 
> .
> 
> 
> 
> ">http://docs.yahoo.com/info/terms/> . 
> 
> 
> 
> 
> [Non-text portions of this message have been
> removed]
> 
> 


__________________________________


Russ hi,

Thanks for the reply.  I did what you suggested.  Below are the results:

All ports outputs set to 0, current consumption: 12.00 mA
All ports inputs (set to 0 anyways) current con:  3.50 mA

There is infact a huge difference, but I don't know how to interpret
this.  What does this tell me?



-----Original Message-----
From: Troxel, Russell [mailto:Russell.Troxel@Russ...]
Sent: Thursday, August 07, 2003 5:52 PM
To: msp430@msp4...
Subject: RE: [msp430] Unreasonably high power consumption


Without seeing the circuit it is hard to know if perhaps the current
consumption is happening outside the device. You might try setting all
the
connected output pins to input to see if there may be an external
contention.


Russ Troxel 
Analog/Digital Design Engineer 


One of the pins in connected to an external load. That could be a
legitimate
load, or it could be a contention. That is where it could be connected to
the output of another device so that the other device's output is high
diving into this devices low output. It could also be a short circuit on the
board.
 

Russ Troxel 
Analog/Digital Design Engineer 

Megger 
4271 Bronze Way 
Dallas, Texas 75237-1088 
Phone: 214.330.3242 (Direct) 
Phone: 800.723.2861 Ext. 3242 (Toll Free) 
FAX: 214.331.7373 
e-mail: russell.troxel@russ... 
URL: www.megger.com 

The information contained in this electronic mail message is confidential.
It is intended solely for the use of the individual or entity to who it is
addressed and others authorized to receive it.  If the reader of this
message is not the intended recipient, you are hereby notified that any use,
copying, dissemination or disclosure of this information is strictly
prohibited.

-----Original Message-----
From: er Yalhi [mailto:oyalhi@oyal...]
Sent: Thursday, August 07, 2003 10:27 AM
To: msp430@msp4...
Subject: RE: [msp430] Unreasonably high power consumption


Russ hi,

Thanks for the reply.  I did what you suggested.  Below are the results:

All ports outputs set to 0, current consumption: 12.00 mA
All ports inputs (set to 0 anyways) current con:  3.50 mA

There is infact a huge difference, but I don't know how to interpret
this.  What does this tell me?



-----Original Message-----
From: Troxel, Russell [mailto:Russell.Troxel@Russ...]
Sent: Thursday, August 07, 2003 5:52 PM
To: msp430@msp4...
Subject: RE: [msp430] Unreasonably high power consumption


Without seeing the circuit it is hard to know if perhaps the current
consumption is happening outside the device. You might try setting all
the
connected output pins to input to see if there may be an external
contention.


Russ Troxel 
Analog/Digital Design Engineer 




 
<http://rd.yahoo.com/M%1812.3170658.4537139.1261774/D=egroupweb/S050053
78:HM/A93353/R=0/SIGt71ok4g/*http://www.netflix.com/Default?mqso`178
294&partid170658> click here	
 
<http://us.adserver.yahoo.com/l?M%1812.3170658.4537139.1261774/D=egroupmai
l/S=:HM/A93353/randS1720880> 	

.



">http://docs.yahoo.com/info/terms/> . 







In principle that means that pins shall be set exactly as they are required

by the circuit connections.
Pins that are connected to outputs of other components must be set as inputs.
Pins that are connected to inputs of other components must be set as outputs.
In your case  both the all-output and the all-input configuration is wrong.
You said you have an rs232 device connected.
This one has some output and some input pins.
Check the correct matching with the MSP430 pins.
The general rule may have some exceptions.
Sometimes there may be a different requirement for pin settings when in 
operation Vs. when idle at low power. Sorry but there is no alternative to 
careful planning of this issue.
Regards
A.Morra

At 18:27 07-08-03 +0300, you wrote:
>Russ hi,
>
>Thanks for the reply.  I did what you suggested.  Below are the results:
>
>All ports outputs set to 0, current consumption: 12.00 mA
>All ports inputs (set to 0 anyways) current con:  3.50 mA
>
>There is infact a huge difference, but I don't know how to interpret
>this.  What does this tell me?
>
>
>
>-----Original Message-----
>From: Troxel, Russell [mailto:Russell.Troxel@Russ...]
>Sent: Thursday, August 07, 2003 5:52 PM
>To: msp430@msp4...
>Subject: RE: [msp430] Unreasonably high power consumption
>
>
>Without seeing the circuit it is hard to know if perhaps the current
>consumption is happening outside the device. You might try setting all
>the
>connected output pins to input to see if there may be an external
>contention.
>
>
>Russ Troxel
>Analog/Digital Design Engineer
>
>
>
>.
>
>
>
>">http://docs.yahoo.com/info/terms/


er Yalhi wrote:
> There is infact a huge difference, but I
don't know how to
> interpret this.  What does this tell me?

General case of high power consumption:
1. On input - need to eliminate floating input.
2. On output high - output pin has small resistance to ground.
3. On output low - output pin has small resistance to power rails.

In case of floating input, CMOS is working as amplifier, not
switch (both transistors not closed). In case of outputs, probably
some solder blurb or small resistor (pull-ups/downs?). 10k pullup
will consume 0.3mA for 3V. Try with outputs high, not low and
measure again.

Indrek

-- 
    Indrek Rebane           |   OU Borthwick-Pignon
    Electronics Engineer    |    Tartu Science Park
    Phone: (+372) 7 302 641 | Riia 185, 51014 Tartu
    Fax:   (+372) 7 383 041 |               Estonia
    indrek@indr...        |  http://www.bps.co.ee


I would like to thank everyone for their replies.

There are no short circuits on the board.  It turns out max232 rx pin,
set to be output was the problem.  Setting that pin to input solved it.
I am now down to 630uA and have not configured the lcd pin directions
*correctly* yet.

Ok, now, all the pins have correct settings, the lcd on and the power
consumption is 600uA while sleeping.  I still think that this is way too
high.  It should be about 20 or 30 uA at most when LPM3.  Any more
ideas?





If this is a custom board the absolutely easiest way to go is to populate
it one element at a time.  Start with the MSP430, verify that you do indeed
get the current you want to see, then add one more element at a time,
retesting as you go.  If you only have the one PCB you can cut traces like
crazy, then reconnect them one at a time.  Or work in reverse, severing one
element at a time, but this is not as straightforward.

I think no one will be able to remote debug a system for you.

--Bruce

> Ok, now, all the pins have correct settings, the
lcd on and the power
> consumption is 600uA while sleeping.  I still think that this is way too
> high.  It should be about 20 or 30 uA at most when LPM3.  Any more
> ideas?




Memfault Beyond the Launch