Thanks.
I did some additional test about this. I have found out that when i
switch pins P2.31:30 and P3.29:28 from default AIN4:7 to IO, because i
try to minimalize leakage current on each ADC (200uA) if it stay
configured as analog input (according to AP10404)
PINSEL2 |= 0x00000030;
PINSEL2 &= ~0x006000C0;
the current increase from acceptable 0.3mA to 1.6mA. I'm sure i have
left these pins unconnected. This result goes directly again my
assumptions.
All pins on P1, P2, P3 are tied high for their internal pull-ups.
Port 0 has no pull-up so it is switch to low output. Big difference
doesn't accure when i switch it to input state.
I'll appreciate any help.
--- In lpc2000@yahoogroups.com, "Danish Ali" <danish@...> wrote:
>
> Hi bernau84,
>
> You say that when you set PINSEL2 to GPIO the supply current increases.
> Can you do some more tests?
> With PINSEL2 to I/O, is the current higher with each pin
> (a) input: IOxDIR bit y = 0
> (b) output high: IOxDIR bit y = 1, IOxSET bit y = 1
> (c) output low: IOxDIR bit y = 1, IOxCLR bit y = 1
> I expect all the pins on port 2 to behave similarly (excluding
> the effects of any external components you have on pins P2.y)
>
> If a given pin has a pull-up resistor (either on your board
> or inside the lpc2214) then you should have low current consumption
> when the pin is an input and low when the pin is output high,
> but high current consumption when the pin is output low.
>
> Similarly if the pin has a pull-down resistor, then you should
> have low current consumption when the pin is input, low current
> consumption when the pin is output low. But you will have high
> current consumption when the pin is output high.
>
> The above are reasonably obvious.
> But if there is no pull-up resistor and no pull-down resistor,
> then there might be *HIGH* current consumption when the pin
> is an input (but low current consumption when the pin is an
> output). This "class A" current occurs when the input voltage is
> somewhere between high and low, and both the n-channel and
> p-channel input transistors are turned on.
>
> You might still be able to achieve low current consumption
> provided you make those pins which are otherwise floating
> into GPIO *outputs*.
>
> Hope this helps,
> Danish
> --- In lpc2000@yahoogroups.com, "bernau84" <bernau84@> wrote:
> >
> > Hallo,
> >
> > i have a problem with too big current to peripherals at power down.
> > On the board where almost all IO pins at LPC 2214 remain unconnected
> > can't still achive consumption which will be at the range described in
> > the AP10404 or the latest AP10421 (i know they are primarily aimed to
> > different type...but in general i hope it could be similar in my
case).Show quoted textHide quoted text
> >
> > The biggest problem seems to be with setting PINSEL2. Only if it's
> > left in its default value the consumpion stay low. An attemp to switch
> > pins controled by PINSEL2 to IO leads to current grows.
> >
> > Thanks.
> >
>