Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] PINSEL Queries

2006-05-31 by Xtian Xultz

Em Qua 31 Mai 2006 09:43, suyash escreveu:
> Hi all,
>
> I am using ARM LPC2106, I have following doubts about the
> configuration of PINSEL0 and PINSEL1.
>
> 1)where exactly should I define it in the initialsation?
>  In common system initialisation or at the eac and every periphral
> (ex. UART0 or SPI etc.) initialisation.

You can reconfigure anytime. For example, I first define all the pins as 
GPIOs, then next I define the GPIO that will be outputs. Then, in the routine 
that configures the UARTs, I change the pins from GPIOs to UART. But you can 
do it all in one time...

> 2) suppose I want to use a single pin as multipurpose functioning, so
> how do I have to take care of PINSELn.
> will it be always overwritten everytime or else we need to mask it
> and then modify it(for retaining its previous status).

All time you write a 32 bits word in the PINSELs, they will change, so you 
have to mask them.

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.