Newbie LPC_PINCON->PINSEL clarification

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Hannes on Mon Jun 27 08:06:53 MST 2011
Good day

I am brand new with ARM microcontrollers and is still at the beginning of the learning curve.

I need to set P3_25 and 26 as GPIO outputs that are pulled low.

In the LPCXpresso included example code (LPCXpresso_Systick_Twinkle) I see that P0_22 is set up with:
LPC_PINCON->PINSEL1    &= (~(3 << 12)); // Set P0_22 to 00 - GPIO
I can not understand the link between PINSEL1 and P0_22. I can not find any documentation explaining this. The closest assumption I could make is that PINSEL0 holds the 32 bits to control the first 16pins, and that P0_22 would then start at the 12th bit of PINSEL1 because it is the 6th pin of the next group.

I can not figure out how that would translate when I want to switch on P3_25 and P3_26.