Discussion group dedicated to the Philips LPC2000 family of ARM MCUs
GPIO issue on LPC2368 - danielgl88 - Nov 5 7:06:11 2009
I've met a confusing problem. GPIO pins supposed to work as a input/output that we've
defined right?
But the problem is I can made the GPIO-able pins on port2.x as GPIO, tested them and they
work well.
But when I try to define GPIO-able pins on port 0.x and 1.x it seems that they're not
working.
Is there any other state that I should define on these pins beside PINSEL, PINMODE,
FIODIR?
FYI, I'm using http://www.futurlec.com/ARM2368_Controller.shtml
Thanks for your attention, really appreciate your help. :)
------------------------------------
______________________________
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: GPIO issue on LPC2368 - Bogdan Marinescu - Nov 5 7:13:17 2009
If you use FIODIR, make sure that you set P0 and P1 in "fast I/O mode"
(check manual for details), otherwise FIODIR won't have any effect on these
ports.
Best,
Bogdan
On Thu, Nov 5, 2009 at 6:01 AM, danielgl88
wrote:
> I've met a confusing problem. GPIO pins supposed to work as a input/output
> that we've defined right?
> But the problem is I can made the GPIO-able pins on port2.x as GPIO, tested
> them and they work well.
> But when I try to define GPIO-able pins on port 0.x and 1.x it seems that
> they're not working.
> Is there any other state that I should define on these pins beside PINSEL,
> PINMODE, FIODIR?
>
> FYI, I'm using http://www.futurlec.com/ARM2368_Controller.shtml
>
> Thanks for your attention, really appreciate your help. :)
>
>
>
[Non-text portions of this message have been removed]
------------------------------------
______________________________
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: GPIO issue on LPC2368 - Daniel Widyanto - Nov 5 20:25:05 2009
Hi,
There are two ways to access GPIO in LPC23xx, the slow IO (IOPIN, IOSET, IOCLR, IODIR) and
fast IO (FIOPIN, FIOSET, FIOCLR, FIODIR, FIOMASK).
The slow IO takes 6-7 clock cycles to read the pin status or write the pin state. Port0
and Port1 is using this method by default to provide compatibility with older LPC20xx. The
fast IO takes 2-clock cycles to read the pin status or write the pin state. Port2, Port3,
and Port4 by default use this method.
To enable Port0 and Port1 being accessed by the fast IO, set the GPIOM bit (GPIOM = 1) in
SCS register (0xE01F_C1A0).
Regards,
-daniel
-----Original Message-----
From: l...@yahoogroups.com [mailto:l...@yahoogroups.com] On Behalf Of Bogdan Marinescu
Sent: Thursday, November 05, 2009 8:13 PM
To: l...@yahoogroups.com
Subject: Re: [lpc2000] GPIO issue on LPC2368
If you use FIODIR, make sure that you set P0 and P1 in "fast I/O mode"
(check manual for details), otherwise FIODIR won't have any effect on these
ports.
Best,
Bogdan
On Thu, Nov 5, 2009 at 6:01 AM, danielgl88
wrote:
> I've met a confusing problem. GPIO pins supposed to work as a input/output
> that we've defined right?
> But the problem is I can made the GPIO-able pins on port2.x as GPIO, tested
> them and they work well.
> But when I try to define GPIO-able pins on port 0.x and 1.x it seems that
> they're not working.
> Is there any other state that I should define on these pins beside PINSEL,
> PINMODE, FIODIR?
>
> FYI, I'm using http://www.futurlec.com/ARM2368_Controller.shtml
>
> Thanks for your attention, really appreciate your help. :)
------------------------------------
______________________________
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: GPIO issue on LPC2368 - Bruce Marshall - Nov 6 4:22:55 2009
Another possibility is that you have errors in LPC23xx.h.=C2=A0 I had a ver=
sion from lwIP where the definitions for FIOxDIRn were WRONG!
=C2=A0
This meant that outputs on P0 and P1 were not working but P2 and P3 (where=
=C2=A0I used FIO
xDIRL) worked perfectly.
--- On Fri, 6/11/09, Daniel Widyanto
wrote:
From: Daniel Widyanto
Subject: RE: [lpc2000] GPIO issue on LPC2368
To: "l...@yahoogroups.com"
Date: Friday, 6 November, 2009, 1:23
=C2=A0=20
Hi,
There are two ways to access GPIO in LPC23xx, the slow IO (IOPIN, IOSET, IO=
CLR, IODIR) and fast IO (FIOPIN, FIOSET, FIOCLR, FIODIR, FIOMASK).
The slow IO takes 6-7 clock cycles to read the pin status or write the pin =
state. Port0 and Port1 is using this method by default to provide compatibi=
lity with older LPC20xx. The fast IO takes 2-clock cycles to read the pin s=
tatus or write the pin state. Port2, Port3, and Port4 by default use this m=
ethod.
To enable Port0 and Port1 being accessed by the fast IO, set the GPIOM bit =
(GPIOM =3D 1) in SCS register (0xE01F_C1A0) .
Regards,
-daniel
-----Original Message-----
From: lpc2000@yahoogroups .com [mailto:lpc2000@yahoogroups .com] On Behalf =
Of Bogdan Marinescu
Sent: Thursday, November 05, 2009 8:13 PM
To: lpc2000@yahoogroups .com
Subject: Re: [lpc2000] GPIO issue on LPC2368
If you use FIODIR, make sure that you set P0 and P1 in "fast I/O mode"
(check manual for details), otherwise FIODIR won't have any effect on these
ports.
Best,
Bogdan
On Thu, Nov 5, 2009 at 6:01 AM, danielgl88 wrote:
> I've met a confusing problem. GPIO pins supposed to work as a input/outpu=
t
> that we've defined right?
> But the problem is I can made the GPIO-able pins on port2.x as GPIO, test=
ed
> them and they work well.
> But when I try to define GPIO-able pins on port 0.x and 1.x it seems that
> they're not working.
> Is there any other state that I should define on these pins beside PINSEL=
,
> PINMODE, FIODIR?
>
> FYI, I'm using http://www.futurlec .com/ARM2368_ Controller. shtml
>
> Thanks for your attention, really appreciate your help. :)
=20=20=20=20=20=20
[Non-text portions of this message have been removed]
------------------------------------

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