Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | LPC2000 | LPC2103 P0.2 and P0.3 problem


Advertise Here

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

LPC2103 P0.2 and P0.3 problem - mjbcswitzerland - Nov 7 10:21:15 2009

Hi All

I have just build 3 boards with the LPC2103 on them and found the following problem (identical on all 3 boards):
- P0.2 and P0.3 can be configured as inputs (they are then high impedance) or outputs (they then drive), but they drive only '0'. If a set is commanded they still drive '0' afterward.
- All other port lines are operating correctly - they drive '1' when configured as outputs and a set command is issued or '0' when a clear command is issued.
- Running the same code on my Olimex prototype board doesn't have this problem (all GPIOs can be commanded to drive '0' or '1').
- It is the same whether working with legacy or fast I/Os.
- The chips are new (the boot SW is V2.21 as delivered, in comparison to V2.2 in the chip on the Olimex prototype board - almost 2 years old).
- All pins are set purely as GPIO for this test.
- All power pins are correctly soldered (including analogue power pins). Battery backup is at 3V3. Supply voltages accurate and decoupled well.
- 14MHz crystal and 32kHz RTC crystal connected and operating correctly.
- Marking:
LPC2103F
14 06
ZPD093
4B
(doesn't match with marking in errata sheet to chip but presumably B revision)
- Olimex board chip reference marking
LPC2103F
09 01
ZPG072
5-Y

Any suggestions as to what may cause this???

Regards

Mark

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


Re: LPC2103 P0.2 and P0.3 problem - Bertrik Sikken - Nov 7 10:44:57 2009

mjbcswitzerland wrote:
> Hi All
>
> I have just build 3 boards with the LPC2103 on them and found the following problem (identical on all 3 boards):
> - P0.2 and P0.3 can be configured as inputs (they are then high impedance) or outputs (they then drive), but they drive only '0'. If a set is commanded they still drive '0' afterward.
> - All other port lines are operating correctly - they drive '1' when configured as outputs and a set command is issued or '0' when a clear command is issued.
> - Running the same code on my Olimex prototype board doesn't have this problem (all GPIOs can be commanded to drive '0' or '1').
> - It is the same whether working with legacy or fast I/Os.
> - The chips are new (the boot SW is V2.21 as delivered, in comparison to V2.2 in the chip on the Olimex prototype board - almost 2 years old).
> - All pins are set purely as GPIO for this test.
> - All power pins are correctly soldered (including analogue power pins). Battery backup is at 3V3. Supply voltages accurate and decoupled well.
> - 14MHz crystal and 32kHz RTC crystal connected and operating correctly.
> - Marking:
> LPC2103F
> 14 06
> ZPD093
> 4B
> (doesn't match with marking in errata sheet to chip but presumably B revision)
> - Olimex board chip reference marking
> LPC2103F
> 09 01
> ZPG072
> 5-Y
>
> Any suggestions as to what may cause this???

Pins P0.2 and P0.3 are also used for I2C, they have open-drain outputs,
so they can only drive low. Your Olimex prototype board probably has
pull-ups on those pins.
See the user manual for more details.

Kind regards,
Bertrik Sikken
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2103 P0.2 and P0.3 problem - Timo - Nov 7 10:45:29 2009

mjbcswitzerland wrote:
> I have just build 3 boards with the LPC2103 on them and found the
> following problem (identical on all 3 boards): - P0.2 and P0.3 can be
> configured as inputs (they are then high impedance) or outputs (they
> then drive), but they drive only '0'.

That's because they are IIC pins and therefore their output driver type
is open drain - see the pin description in the datasheet.

> If a set is commanded they still drive '0' afterward.

I bet they don't actually drive '0' when you set them high - they just
don't drive at all.

--

Timo

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2103 P0.2 and P0.3 problem - mjbcswitzerland - Nov 7 11:51:14 2009

Hi

Thanks.

These are indeed open collector only - I must have made a mistake when measuring because the port was sinking 30mA (must have been really driving a '0' at the time).

However I was mislead a bit by the errata since I knew that the I2C1 lines (P0.17 and P0.18) were originally open-collector only whereas the idea was that they should be normal GPIO when not used as I2C1 (as is the case now). I assumed that I2C0 was already like that so could be used as 'normal' GPIO when not used as I2C0.

Not so bad though since I can still use them like that in the design.

On another note about GPIOs:
In my notes I find that P0.31 (on LPC2101/2/3) is output only. I presumed that I wrote this down from an old errata sheet or something, but I couldn't find this in the erratas nor any notes in the data sheet. My tests just now didn't show this to be the case either.

I am still wondering where this note came from. Is it possible that it was once the case or can I conclude that it was a mistake and can be completely dismissed...?

Regards

Mark

> I bet they don't actually drive '0' when you set them high - they just
> don't drive at all.
>
> --
>
> Timo
>

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Re: LPC2103 P0.2 and P0.3 problem - leon Heller - Nov 7 12:11:56 2009

----- Original Message -----
From: "mjbcswitzerland"
To:
Sent: Saturday, November 07, 2009 4:47 PM
Subject: [lpc2000] Re: LPC2103 P0.2 and P0.3 problem
> Hi
>
> Thanks.
>
> These are indeed open collector only - I must have made a mistake when
> measuring because the port was sinking 30mA (must have been really driving
> a '0' at the time).
>
> However I was mislead a bit by the errata since I knew that the I2C1 lines
> (P0.17 and P0.18) were originally open-collector only whereas the idea was
> that they should be normal GPIO when not used as I2C1 (as is the case
> now). I assumed that I2C0 was already like that so could be used as
> 'normal' GPIO when not used as I2C0.
>
> Not so bad though since I can still use them like that in the design.
>
> On another note about GPIOs:
> In my notes I find that P0.31 (on LPC2101/2/3) is output only. I presumed
> that I wrote this down from an old errata sheet or something, but I
> couldn't find this in the erratas nor any notes in the data sheet. My
> tests just now didn't show this to be the case either.
>
> I am still wondering where this note came from. Is it possible that it was
> once the case or can I conclude that it was a mistake and can be
> completely dismissed...?
>

P0.31 is output only, see the data sheet (Section 5.2).

Leon

------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2103 P0.2 and P0.3 problem - mjbcswitzerland - Nov 7 14:11:25 2009

Thanks Leon

That is where it came from - it is quite well hidden...

However the term "output-only" is not very clear.
As output it can be toggled (normal) and I expected that, when not programmed as output (i.e. as input) it would also drive but this is not the case - it is in fact high impedance.

This means that it is probably more like an input that can't be read than output only; or it means it only works fully as output.

With JTAG this can not be tested (since it is shared with JTAG) so I will need to write a program to actually display the value to be absolutely sure. Unless someone already tried this...

Regards

Mark

> > On another note about GPIOs:
> > In my notes I find that P0.31 (on LPC2101/2/3) is output only. I presumed
> > that I wrote this down from an old errata sheet or something, but I
> > couldn't find this in the erratas nor any notes in the data sheet. My
> > tests just now didn't show this to be the case either.
> >
> > I am still wondering where this note came from. Is it possible that it was
> > once the case or can I conclude that it was a mistake and can be
> > completely dismissed...?
> > P0.31 is output only, see the data sheet (Section 5.2).
>
> Leon
>

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2103 P0.2 and P0.3 problem - mjbcswitzerland - Nov 7 15:22:36 2009

Hi Leon

I followed up on this and did a simple test:

Periodically the following is called (with P0.0 configured as output and P0.31 configured as input):

if (FIO0PIN & 0x80000000) {
FIO0SET = 0x00000001;
}
else {
FIO0CLR = 0x00000001;
}

The output P0.0 follows the input state of P0.31 !!!!

This suggests that P0.31 is actually working as an input too....

Is the data sheet incorrect???

Regards

Mark

> > P0.31 is output only, see the data sheet (Section 5.2).
> >
> > Leon
>

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2103 P0.2 and P0.3 problem - Leon - Nov 7 15:37:21 2009



--- In l...@yahoogroups.com, "mjbcswitzerland" wrote:
>
> Hi Leon
>
> I followed up on this and did a simple test:
>
> Periodically the following is called (with P0.0 configured as output and P0.31 configured as input):
>
> if (FIO0PIN & 0x80000000) {
> FIO0SET = 0x00000001;
> }
> else {
> FIO0CLR = 0x00000001;
> }
>
> The output P0.0 follows the input state of P0.31 !!!!
>
> This suggests that P0.31 is actually working as an input too....
>
> Is the data sheet incorrect???
>
> Regards
>
> Mark

What was P0.31 connected to?

Leon

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2103 P0.2 and P0.3 problem - mjbcswitzerland - Nov 7 16:00:40 2009

Hi Leon

I tested on my board and on the Olimex prototyping board.

- On the Olimex the line is pulled up by 100k to 3V3. It is read as '1'.
When I pull it down with a short circuit to ground it reads as '0'

- On my board I have it open circuit for the test. Open-circuit it reads as '0'. When I pull it up to 3V3 via a 10k resistor it reads as '1'.

Regards

Mark

> What was P0.31 connected to?
>
> Leon
>

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Re: LPC2103 P0.2 and P0.3 problem - Paul Curtis - Nov 8 5:25:23 2009

On Sat, 07 Nov 2009 20:58:56 -0000, mjbcswitzerland
wrote:

> I tested on my board and on the Olimex prototyping board.
>
> - On the Olimex the line is pulled up by 100k to 3V3. It is read as '1'.
> When I pull it down with a short circuit to ground it reads as '0'
>
> - On my board I have it open circuit for the test. Open-circuit it reads
> as '0'. When I pull it up to 3V3 via a 10k resistor it reads as '1'.

I believe reading in the LPC2148 errata that having P0.31 pulled low on
reset may lead to unpredictable device behaviour.

Ahh, yes, here we go:

"Note.1:Port pin P0.31 must not be driven low during reset. If low on
reset the device behaviour is undetermined."

That's gone from the errata sheet for LPC210x; perhaps it's just a
documentation thing?

-- Paul.

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2103 P0.2 and P0.3 problem - mjbcswitzerland - Nov 8 8:20:23 2009

Hi Paul

That is a little worrying (not knowing which document is to be believed...).

However in my case I do have a pull up and also it is used as output only in the application (yesterday I really tested without pull up on a board with only a processor).

A further detail to the P0.2. and P0.3 GPIOs: here I was not sure whether the open collector characteristic is restricted to GPIO use or not so I tried generating a PWM signal on P0.3 (MAT0.0). Also in this case it was necessary to add a pull-up to see the output voltage.

So now I think that all of the characteristics of these are well understood. It would be nice to be sure on P0.31 but presently I have it noted as - "Use pull-up to be sure that the processor doesn't do crazy things and prefer output use rather than input since the data sheet says that it is output only, although it actually works as input"...;-)

Regards

Mark

>
> I believe reading in the LPC2148 errata that having P0.31 pulled low on
> reset may lead to unpredictable device behaviour.
>
> Ahh, yes, here we go:
>
> "Note.1:Port pin P0.31 must not be driven low during reset. If low on
> reset the device behaviour is undetermined."
>
> That's gone from the errata sheet for LPC210x; perhaps it's just a
> documentation thing?
>
> -- Paul.
>

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )