Re: LPC2292: GPIO-output on P3.29 possible ???

Started by Anton Erasmus June 1, 2005
On 1 Jun 2005 at 13:43, alipowsky wrote:

> I want to use P3.29 (Pin 27, P3.29/BLS2/AIN6) as GPIO (output)
> The manual says it can be done by setting Bit 6 of PINSEL2 to zero.
>
> my testcode:
>
> PINSEL2 &= 0xffffffbf; // Reset PINSEL2.6 to config P3.29 as GPIO
> IO3DIR |= 0x20000000; // Set P2.29 as output IO3SET = 0x20000000;
> // Set portpin high
>
> But the pin does not go high ??
>
> Did anybody use this pin as GPIO output already ?

Which header files are you using ? (i.e. where do you define PINSEL2, IO3DIR etc.)
I used the header files from aeolus development, and there was a mistake with one of
definitions doe IO Port 3. (Copy/Paste mistake - same value for port 2 and port 3)

Regards
Anton Erasmus --
A J Erasmus


An Engineer's Guide to the LPC2100 Series

I want to use P3.29 (Pin 27, P3.29/BLS2/AIN6) as GPIO (output)
The manual says it can be done by setting Bit 6 of PINSEL2 to zero.

my testcode:

PINSEL2 &= 0xffffffbf; // Reset PINSEL2.6 to config P3.29 as GPIO
IO3DIR |= 0x20000000; // Set P2.29 as output
IO3SET = 0x20000000; // Set portpin high

But the pin does not go high ??

Did anybody use this pin as GPIO output already ?

regards
Andreas


--- In lpc2000@lpc2..., "Anton Erasmus" <antone@s...> wrote:
> On 1 Jun 2005 at 13:43, alipowsky wrote:
>
> > I want to use P3.29 (Pin 27, P3.29/BLS2/AIN6) as GPIO (output)
> > The manual says it can be done by setting Bit 6 of PINSEL2 to zero.
> >
> > my testcode:
> >
> > PINSEL2 &= 0xffffffbf; // Reset PINSEL2.6 to config P3.29 as GPIO
> > IO3DIR |= 0x20000000; // Set P2.29 as output IO3SET = 0x20000000;
> > // Set portpin high
> >
> > But the pin does not go high ??
> >
> > Did anybody use this pin as GPIO output already ?
>
> Which header files are you using ? (i.e. where do you define
PINSEL2, IO3DIR etc.)
> I used the header files from aeolus development, and there was a
mistake with one of
> definitions doe IO Port 3. (Copy/Paste mistake - same value for port
2 and port 3)
>
> Regards
> Anton Erasmus > --
> A J Erasmus

I use the Rowley header files. (Crossworks for ARM v.1.4)
Thea are okay. I also checked the assembler code and the adresses
there are as expected:

PINSEL2: 0xe002c014
IO3DIR: 0xe0028038
IO3SET: 0xe0028034

regards
Andreas