Yahoo Groups archive

Lpc2000

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

Message

Re: PINSEL2 crashes everything

2005-08-02 by soren_t_hansen

--- 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

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.