EmbeddedRelated.com
Forums

LPC2132 Power Down Current Too High

Started by sig5534 December 15, 2006
I've got a LiIon barrery design with an LPC2132, and when I put it into
power down the supply current stays up around 700uA. That seems way
too high. I am running it on 3.3V and I have switched basically all of
the pins to Input so that non are driving pull up/dn resistors during
powerdown. I even shut off the JTAG and UART so there was no current
being put out to anywhere else.

I can't figure out where this current is going to, it seems to be eaten
internally by the LPC2132. I only have a 20MHz xtal which is down, and
there is no RTC xtal. I have the RTC xtal input GND, and I just hook
the Vbat pin to the 3.3V.

The part comes out of PowerDown as I would expect, as I wanted, when an
EINT3 happens. But the powerdown current seems way too high.

One thing I noticed that seems odd, I am using the internal pullups on
(4) P1 pins that go to external sw's. The voltage on those pull up to
about 2.4V, not the 3.3 I would expect. That seems strange, and I have
nothing else hooked to those pins but open switches. The internal
pullup resistors of the LPC2132 only pull up to 2.4V. Why?

Anyone checked the real power down current on these MCUs?

I just can't seem to get it to go down any further. Is there something
else I need to shut off?

Chris.

An Engineer's Guide to the LPC2100 Series

> -----Original Message-----
> From: l...
> [mailto:l...]On Behalf
> Of sig5534
> Sent: Friday, December 15, 2006 5:32 PM
> To: l...
> Subject: [lpc2000] LPC2132 Power Down Current Too High
> I've got a LiIon barrery design with an LPC2132, and when I
> put it into
> power down the supply current stays up around 700uA. That seems way
> too high. I am running it on 3.3V and I have switched
> basically all of
> the pins to Input so that non are driving pull up/dn resistors during
> powerdown. I even shut off the JTAG and UART so there was no current
> being put out to anywhere else.
>
> I can't figure out where this current is going to, it seems
> to be eaten
> internally by the LPC2132. I only have a 20MHz xtal which is
> down, and
> there is no RTC xtal. I have the RTC xtal input GND, and I just hook
> the Vbat pin to the 3.3V.
>
> The part comes out of PowerDown as I would expect, as I
> wanted, when an
> EINT3 happens. But the powerdown current seems way too high.
>
> One thing I noticed that seems odd, I am using the internal
> pullups on
> (4) P1 pins that go to external sw's. The voltage on those
> pull up to
> about 2.4V, not the 3.3 I would expect. That seems strange,
> and I have
> nothing else hooked to those pins but open switches. The internal
> pullup resistors of the LPC2132 only pull up to 2.4V. Why?
>
> Anyone checked the real power down current on these MCUs?
>
> I just can't seem to get it to go down any further. Is there
> something
> else I need to shut off?
>
> Chris.
>

Since you are turning all port pins to inputs, do you have pullup or
pulldown resistors on all pins? If any pins are left floating this
will increase your supply current.

If your pullups are to 3.3V, and some of the pins are only going up
to 2.4V, obviously you have some current flowing there. How much of
your 700uA is in these 4 resistors? Maybe there are pulldown
resistors internal to the part.

I'm not using the LPC2132, so I can't speak directly to it, but on
my LPC2148 I did manage to get down to 300uA. About 550uA of my original
supply current was due to the USB line floating. Putting in 1Mohm pulldowns
fixed this. The JTAG interface may have internal pullups on some pins,
but usually there are external pulldowns on these pins too, so this
will increase the current consumption.

Hope this helps,

Mike
[Since you are turning all port pins to inputs, do you have pullup or
pulldown resistors on all pins? If any pins are left floating this
will increase your supply current.]

Yeah I know. I thought that too. But all of my pins are at either: 0.0V, 3.3V, or the 2.4V on those internal P1 pullups.

>> If your pullups are to 3.3V, and some of the pins are only going up
>> to 2.4V, obviously you have some current flowing there.

Sorry, there is nothing on these pins but open sw's.

>> How much of your 700uA is in these 4 resistors?

You tell me, what is the value of the internal LPC2132 resistors?
They are not my resistors, they are inside the LPC2132.

>> I'm not using the LPC2132, so I can't speak directly to it, but on
>> my LPC2148 I did manage to get down to 300uA.

Really. That is all you got it down to? That seems as bad as my situation.
The data sheet says it is suppose to be much lower than that. Right?

Chris.
> -----Original Message-----
> From: l...
> [mailto:l...]On Behalf
> Of s...@hotmail.com
> Sent: Friday, December 15, 2006 7:14 PM
> To: l...
> Subject: Re: [lpc2000] LPC2132 Power Down Current Too High
> [Since you are turning all port pins to inputs, do you have pullup or
> pulldown resistors on all pins? If any pins are left floating this
> will increase your supply current.]
>
> Yeah I know. I thought that too. But all of my pins are at
> either: 0.0V, 3.3V, or the 2.4V on those internal P1 pullups.
>
> >> If your pullups are to 3.3V, and some of the pins are only going up
> >> to 2.4V, obviously you have some current flowing there.
>
> Sorry, there is nothing on these pins but open sw's.

I understand that, but since the lines are not pulling up to 3.3V, there
is current flow "somewhere". This could be leakage current into the chip.
The current is probably being sourced by your pullup resistors. Try
removing them to see what your standby current drops to.

>
> >> How much of your 700uA is in these 4 resistors?
>
> You tell me, what is the value of the internal LPC2132 resistors?
> They are not my resistors, they are inside the LPC2132.

Measure the voltage across the pullup resistors, and you can calculate
the current that is lost. You can calculate the value of the internal
resistors if you desire.
>
> >> I'm not using the LPC2132, so I can't speak directly to it, but on
> >> my LPC2148 I did manage to get down to 300uA.
>
> Really. That is all you got it down to? That seems as bad
> as my situation.
> The data sheet says it is suppose to be much lower than that. Right?
>
> Chris.

That was the best I could do with out spending too much time on it, and it
was good enough, as I have a 2500mAhr backup supply.

Have you cleaned the flux residue off of the board? This can cause current
leakage as well.

Also note that this was the current into my board, which has a switching
supply
supplying the 3.3V. So the actual 3.3V current could be higher, but I don't
know what it is. In the next board, I will have the ability to measure it.

Mike
[I understand that, but since the lines are not pulling up to 3.3V, there
is current flow "somewhere". This could be leakage current into the chip.
The current is probably being sourced by your pullup resistors. Try
removing them to see what your standby current drops to.]

Again, there are no external resistors on those pins.
According to the datasheet there are "internal pullups" on those pins.
I did not add any pullups. The manual says on page 70 for P1.16-19:
"Standard I/O, Internal Pullup"

But thinking about this further, I am beginning to wonder whether there are
internal pullups really on these pins. The way the data is written it lists
the internal pullups in the line for the TRACE modes. Perhaps the pullups
are not there when they are simple Inputs.

I guess that might explain the flaky 2.4V I see on the pins. Hmmmm, I
guess I will try putting external pullups on those and see if the Icc goes
down.

Chris.
>> That was the best I could do with out spending too much time on it,
>> and it was good enough, as I have a 2500mAhr backup supply.

I have the same conditions, 2.4AHr LiIon battery. In your case with
0.3mA drain your battery goes dead in 10 months sitting on the shelf.
In my case it goes dead in 4 months. Neither is acceptable to me.

>> Also note that this was the current into my board,
>> which has a switching supply supplying the 3.3V.
>> So the actual 3.3V current could be higher,
>> but I don't know what it is. In the next board,
>> I will have the ability to measure it.

I don't think these parts are meeting their specs. Or if they do,
there is some undocumented things that must be done to get the Icc down.

The data sheet says that the Icc in power down is typ 60uA, and the RTC
if it is running is 18uA. I'm not even using the RTC. Anyway you
slice it, the total Icc should be less than 75uA. Your results are 4X
worse than that (and you say yours could even worse), and mine are 10X
worse than that. My measurements are accurate.

I put 4 external pullup resistors on those P1 pins that were using the
internal pullups, and their voltages are now all at 3.3, but it still
had no effect on the Icc. Still 700uA.

One side question that remains, why do the internal pullups on the P1
group of pins only pull up to 2.4V???? That is a fact.

Another side question, I noticed right away that the SRAM gets cleared
to ZERO after coming out of power down. It's not suppose to happen -
but it does. The Errata only talks about this happening if the Vcc
drops low. No way, my Vcc is 3.3V rock solid all the time. Yet it's
still happening.

>> Have you cleaned the flux residue off of the board?
>> This can cause current leakage as well.

Not possible. I use all rosin flux. But the boards are clean anyway.

I have been through all of the doc and app notes and I see no
explanation for why the Icc is so high. Furthermore, I have now gone
through the rest of my board in detail chasing these uA, cutting traces
etc, and the current is going into the LPC2132. No doubt about that
now. And it is not feeding any pullup resistors. The voltage across
them are all zero.

Have you checked the Rev codes on your parts? Not even sure what mine
are have to check that tomorrow. There are Rev-D parts out now. I may
have to get some Rev-D and see what their Icc is like.

The only things left I see that I can try is to shut down all of the
internal perfs directly through the software prior to calling power
down. Something inside this chip is using more current than it is
suppose to.

Chris.
Hi Chris,
> >> That was the best I could do with out spending too much time on it,
> >> and it was good enough, as I have a 2500mAhr backup supply.
>
> I have the same conditions, 2.4AHr LiIon battery. In your case with
> 0.3mA drain your battery goes dead in 10 months sitting on
> the shelf.
> In my case it goes dead in 4 months. Neither is acceptable to me.

Well, since I am using NiMH, my battery will go dead long before
10 months just due to self discharge, so 0.3mA doesn't bother me.
Besides which, in my application there is not much penalty for
losing power completely (other than being hard on the batteries).

> I don't think these parts are meeting their specs. Or if they do,
> there is some undocumented things that must be done to get
> the Icc down.

That is always possible.

>
> The data sheet says that the Icc in power down is typ 60uA,
> and the RTC
> if it is running is 18uA. I'm not even using the RTC. Anyway you
> slice it, the total Icc should be less than 75uA. Your
> results are 4X
> worse than that (and you say yours could even worse), and
> mine are 10X
> worse than that. My measurements are accurate.

How have you terminated the unused RTC pins?

>
> I put 4 external pullup resistors on those P1 pins that were
> using the
> internal pullups, and their voltages are now all at 3.3, but it still
> had no effect on the Icc. Still 700uA.

So, just to clarify, you have pullups, or pulldowns on ALL pins that
are configured as inputs? Any outputs are not sourcing or sinking
any current? Are all P1 pins that have pullups set to inputs, or
to outputs that are set high?

>
> One side question that remains, why do the internal pullups on the P1
> group of pins only pull up to 2.4V???? That is a fact.

How did you measure this? What is the impedance of the device used?
If it was a DMM, it might have a 1Mohm input impedance, which is
pulling the internal pullup current source down. Just for fun, measure
the voltage with respect to +3.3V. Or, perhaps there is some internal
leakage current to the device.

Like you, I have some switches on these inputs, but I have 10K pullups
on them as well as the internal pullups.

>
> Another side question, I noticed right away that the SRAM
> gets cleared
> to ZERO after coming out of power down. It's not suppose to happen -
> but it does. The Errata only talks about this happening if the Vcc
> drops low. No way, my Vcc is 3.3V rock solid all the time. Yet it's
> still happening.

I don't have that problem at all with the 2148. My RAM contents is
preserved out of power down. It would be odd that the contents get cleared
to zero, unless the C startup code is executing again (indicating a reset,
or some unhandled exception). RAM that has lost power usually contains
somewhat random data.

How do you wake up from power down?

>
> >> Have you cleaned the flux residue off of the board?
> >> This can cause current leakage as well.
>
> Not possible. I use all rosin flux. But the boards are clean anyway.

All rosin flux will leak as well. If there is any ionic contamination,
and moisture present (even slight), you will have leakage current. Been
there, done that, cleaning boards is required.

>
> I have been through all of the doc and app notes and I see no
> explanation for why the Icc is so high. Furthermore, I have now gone
> through the rest of my board in detail chasing these uA,
> cutting traces
> etc, and the current is going into the LPC2132. No doubt about that
> now. And it is not feeding any pullup resistors. The voltage across
> them are all zero.
>
> Have you checked the Rev codes on your parts? Not even sure
> what mine
> are have to check that tomorrow. There are Rev-D parts out
> now. I may
> have to get some Rev-D and see what their Icc is like.

My parts are the initial revision (no revision code).

How have you terminated the JTAG pins? Do you have pulldowns on any
of them? There are internal pullups on these pins (and in fact all
of port 1).

>
> The only things left I see that I can try is to shut down all of the
> internal perfs directly through the software prior to calling power
> down. Something inside this chip is using more current than it is
> suppose to.

This I do. All perhipherals that I power up, also get powered down.
The datasheet indicates that analog peripherals in particular should
be powered down, as they consume static current that is independant
of the clocks running.

Mike
>>How have you terminated the unused RTC pins?

RTC XTAL input is grounded, output open.

>> So, just to clarify, you have pullups, or pulldowns on ALL pins that are configured as inputs?

Yep.

>> Any outputs are not sourcing or sinking any current?

Correct.

>> Are all P1 pins that have pullups set to inputs,
>> or to outputs that are set high?

The TCK and RTCK pins have pull downs, but even if they are being sourced/pulled up from inside the chip that only accounts for 10's of uAmps, does not explain 700uA. The voltage I measured across the resistors was minimal.

> One side question that remains, why do the internal pullups on the P1
> group of pins only pull up to 2.4V???? That is a fact.

>>How did you measure this?

A DMM, and a scope.

>> What is the impedance of the device used?

10M Ohm DMM I think. But I also used a 10X scope which is 10M.

>> If it was a DMM, it might have a 1Mohm input impedance,
>> which is pulling the internal pullup current source down.

As I recall the datasheet said something about a 50uA pullup current or 30K-100K resistance. In either case even a 1M input impedance isn't going to produce 2.4V. I saw voltages ranging from 2.3-2.6 depending on what I used, but it was never higher than this.

>> Like you, I have some switches on these inputs, but I have 10K pullups
>> on them as well as the internal pullups.

Like I said, I put 10K pullups on them too, but the Icc did not change.

>> I don't have that problem at all with the 2148. My RAM contents is
>> preserved out of power down. It would be odd that the contents get cleared
>> to zero, unless the C startup code is executing again (indicating a reset,
>> or some unhandled exception). RAM that has lost power usually contains
>> somewhat random data.

Well that's what I thought too. But when I run the debugger, it is not going back to the startup 0x0 code. The SRAM is just all ZERO. All of the data that was there before power down is gone. So you are using a 2148. Hmmm. It seems then that what I am seeing is just in the 2132.

>> How do you wake up from power down?

EINT3 pin triggered by a sw.

>> All rosin flux will leak as well. If there is any ionic contamination,
>> and moisture present (even slight), you will have leakage current.
>> Been there, done that, cleaning boards is required.

I work with giga ohm circuitry many times, so I am well aware of leakage surface currents. But when I worry about those it is usually in the pico amp range, and much higher voltages. 700uA of surface leakage would be HUGE. If I dragged the board in dirt for a week I couldn't get that. That's an equiv resistance of 4700 Ohms.

I do not agree that Rosin flux is anything like organic. Organic aqueous flux contains acid, Rosin flux does not. I won't use any organic flux on any analog circuitry because of the problems over time. Even with cleaning, aqueous flux often gets trapped under electrolytic capacitors. After about 5 years the acid remaining starts eating the copper. I've had to replace traces on boards more times than I can count under caps eaten by "cleaned" organic flux. Never happens with Rosin flux. You can leave the stuff on the boards and it actually helps to protect the traces. That's what NO-CLEAN flux is all about. It is Rosin.

>> How have you terminated the JTAG pins?

I have resistors on all of them, and I shut off the JTAG and set them all for inputs.

The bottom line is this: I measured the voltage ACROSS all the resistors and there is simply nothing there. Whether they are at 0V or 3.3V makes no difference because I looked at the voltage across them, ie. the current through them. They are all zip.

>> This I do. All perhipherals that I power up, also get powered down.
>> The datasheet indicates that analog peripherals in particular should
>> be powered down, as they consume static current that is independant
>> of the clocks running.

Well that may be it. I will try that tomorrow. Hopefully that will get the current down.

Thanks, Chris.
> >> Are all P1 pins that have pullups set to inputs,
> >> or to outputs that are set high?
>
> The TCK and RTCK pins have pull downs, but even if they are
> being sourced/pulled up from inside the chip that only
> accounts for 10's of uAmps, does not explain 700uA. The
> voltage I measured across the resistors was minimal.

Well, on my part this would account for 100uA.

> >> All rosin flux will leak as well. If there is any ionic
> contamination,
> >> and moisture present (even slight), you will have leakage current.
> >> Been there, done that, cleaning boards is required.
>
> I work with giga ohm circuitry many times, so I am well aware
> of leakage surface currents. But when I worry about those it
> is usually in the pico amp range, and much higher voltages.
> 700uA of surface leakage would be HUGE. If I dragged the
> board in dirt for a week I couldn't get that. That's an
> equiv resistance of 4700 Ohms.
>
> I do not agree that Rosin flux is anything like organic.
> Organic aqueous flux contains acid, Rosin flux does not. I
> won't use any organic flux on any analog circuitry because of
> the problems over time. Even with cleaning, aqueous flux

Rosin is organic... It is made from tree sap, and hence organic
by nature. Take a look at: http://en.wikipedia.org/wiki/Rosin

> often gets trapped under electrolytic capacitors. After
> about 5 years the acid remaining starts eating the copper.
> I've had to replace traces on boards more times than I can
> count under caps eaten by "cleaned" organic flux. Never
> happens with Rosin flux. You can leave the stuff on the
> boards and it actually helps to protect the traces. That's
> what NO-CLEAN flux is all about. It is Rosin.
>

Well, my experience has been that improperly cleaned rosin flux
can have large leakage currents. We had problems with 10K pullups
not pulling up hard enough, so the leakage currents were likely
in the 100uA range.

We always use rosin flux. No clean fluxes are not always rosin,
as the cleaning process we use for rosin flux, doesn't work with
no clean fluxes, so something is different. For reference, we
clean with an ultrasonic cleaner, containing perchloroethylene
(dry cleaning fluid). The nice thing about perc, is that it
is non-conductive (we had problems when using alchohol, which is
conductive).

If you can, find an article in the September 2004 issue of
Circuits Assembly with a title of "Activate That Flux!", which
may give you some additional information.

Good luck in your search,

Mike
> Rosin is organic... It is made from tree sap, and hence organic
> by nature. Take a look at: http://en.wikipedia.org/wiki/Rosin

Rosin flux is inorganic and I don't care what wikipedia says. That
is well known. wikipedia is nothing but posted comments from
anyone. Check an organic chemistry textbook. Organic compounds are
those containing a C-H bond, such as most acids. It is not anything
that just comes from nature.

http://www.simchem.com/electronic_fluxes.htm

> Good luck in your search,

I tried my code with setting the PCONP reg bits to all zero. No
change. The supply current is still 685uA. 10X higher than it
should be.

I checked my chips and they are Rev-B. There are Rev-D chips out now
and I am trying to get some of those.

Here is my shutdown / power up code:

Disable_INT(); // Disable INTs
PWMTCR = 0xA; // Reset & disable PWM timer
// program the flash to Backup Location
FlashMainData();// long call to IAP in ram
// complete shut down
EXTINT = BIT(3); // clear the EINT3
IOSET1 = P1_SYSPWR; // System Power OFF
IOSET0 (P0_SEG_A|P0_SEG_B|P0_SEG_C|P0_SEG_D|P0_SEG_E|P0_SEG_F|P0_SEG_G|P0_SEG
_DP); // turn off segments HI
IOSET0 = (P0_DIG7|P0_DIG6); // set HI digits with PullUp res
IOCLR0 = (P0_DIG5|P0_DIG4|P0_DIG3|P0_DIG2|P0_DIG1); // clr LO digits
with PullDn res
PINSEL0 = 0; // Shut off UART0
PINSEL2 = 0; // JTAG pins as inputs
AD0CR= AD0CR&(~BIT(21)); // * clr PDN bit *
AD1CR= AD1CR&(~BIT(21)); // * clr PDN bit *
PCONP= 0x0; // * TURN OFF ALL PERFs *
PCON = BIT(1)|BIT(2)|BIT(3)|BIT(4); // * POWER DOWN *
// ==>> POWER IS NOW OFF <=// Hi->Lo Edge on EINT3 restarts
// Reinit the PLL
EXTINT = BIT(3); // clear the EINT3
PCONP= BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(7)|BIT(8)|BIT(9)|BIT(10)
|BIT(12)|BIT(19)|BIT(20); // * TURN ON ALL PERFs *
AD0CR= AD0CR|BIT(21); // * set PDN bit *
AD1CR= AD1CR|BIT(21); // * set PDN bit *
// set PLL multiplier & divisor, values computed in config.h
PLLCFG = PLLCFG_MSEL | PLLCFG_PSEL; // PLL Configuration Register
PLLFEED = 0xAA; // Make it happen. These two updates
PLLFEED = 0x55; // MUST occur in sequence.
PLLCON = PLLCON_PLLE; // Enable PLL
PLLFEED = 0xAA; // Make it happen. These two updates
PLLFEED = 0x55; // MUST occur in sequence.
while (!(PLLSTAT & PLLSTAT_LOCK)) continue; // wait for PLL lock
PLLCON = PLLCON_PLLE | PLLCON_PLLC; // enable & connect
PLLPLLFEED = 0xAA; // Make it happen. These two updates
PLLFEED = 0x55; // MUST occur in sequence.
PINSEL0 = CFG_PINSEL0; // setup Pins
PINSEL2 = CFG_PINSEL2; // Enable JTAG
PWMTCR = BIT(1); // Reset & disable PWM timer
PWMTCR = BIT(0)|BIT(3); // Enable Counters and PWM
Enable_INT(); // Enable INTs

Thanks, Chris.