Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: PINSEL2 crashes everything

2005-08-02 by Jim Parziale

Oops - now I did it ...
Is this what you really meant?

 PINSEL2 = PINSEL2 & ((1 << 2) | (1 << 3));

Even so, this clear all other bits...

On 8/2/05, Jim Parziale <nuncio.bitis@...> wrote:
> 
> PINSEL2 = (PINSEL2 & (0 << 2) & (0 << 3));
> 
> According to this, you're clearing PINSEL2 altogether. Did you mean:
> 
> PINSEL2 = (PINSEL2 & (1 << 2) & (1 << 3));
> 
> On 8/2/05, soren_t_hansen <soren_t_hansen@...> wrote:
> > 
> >  --- In lpc2000@yahoogroups.com, "Aalt Lokhorst" <lokhorst@s...> wrote:
> > > Hello Søren,
> > > 
> > > Not sure what processor you are using but I think you are diabling
> > the JTAG by changing a JTAG line into a GPIO line.
> > > 
> > > I am using the LC2129 and the usermanual of this processor shows the
> > following:
> > > 
> > > Table 63: Pin Function Select Register 2 for LPC2119/2129/2194
> > > (PINSEL2 - 0xE002C014)
> > > 
> > > 1:0 Reserved.
> > > 
> > > 2 When 0, pins P1.36:26 are used as GPIO pins.
> > > When 1, P1.31:26 are used as a Debug port. (RTCK)
> > > 
> > > 3 When 0, pins P1.25:16 are used as GPIO pins.
> > > When 1, P1.25:16 are used as a Trace port. (TRACESYNC)
> > > 
> > > 4:5 Reserved. Note: These bits must not be altered at any time.
> > > Changing them may result in an incorrect code execution.
> > > 
> > > 6:31 Reserved.
> > > 
> > > According to this info you are disabling the JTAG RTCK line.
> > > 
> > > Hope this helps,
> > > Aalt
> > > 
> > 
> > Ups forgot to tell - it's a lpc2132 :o)
> > 
> > I use the following line and it still crashes:
> > 
> > PINSEL2 = (PINSEL2 & (0 << 2) & (0 << 3));
> > 
> > At the moment it isn't that big a deal, since the PINSEL2 bit 2 and 3
> > are 0 at reset, and that's what I want them to be. It just pusled me
> > that I couldn't write to those two bits whithout the MCU crashing.
> > 
> > /Søren
> > 
> 
> 


-- 
----------------------------------------------------------
Jim Parziale
Email: nuncio.bitis@...
Malden, MA
----------------------------------------------------------


[Non-text portions of this message have been removed]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.