How to use PIO0_13 and 18 for GPIO

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use PIO0_13 and 18 for GPIO

Jump to solution
315 Views
brant
Contributor I

Hi,

I am using both the 48 pin and 64 pin version of the LPC1549 in a design and trying to setup PIO0_13 and PIO0_18 for GPIO to control other hardware.  Looking into Board_Init() in LPCOpen I noticed that it is trying to control those two pins and make use of them for UART0 based debug.  So I disabled that code and instead just init the GPIO subsystem instead with  Chip_GPIO_Init(LPC_GPIO);

My main issue is getting PIO0_13 and PIO0_18 unstuck, even when avoiding the Board_Init() code.  I need to use these pins for external hardware.  They seem to be stuck high no matter what I've tried so far. 

I am easily able to change the pin start of other pins such as PIO0_1, PIO0_2, PIO0_7 for example so I don't suspect anything related to the code doing the state change, just something is missing in the configuration allowing those pins to be software controlled like the others.

What am I missing?

Thanks

Labels (1)
1 Solution
147 Views
brant
Contributor I

I was able to make PIO0_13 and PIO0_18 work just fine as GPIO lines.  The answer lies in the UM10736 manual in chapter 8 regarding the SWM. 

The answer lies in the PINASSIGN0 register by putting that register in reset I was able to get those lines to function as GPIOs

//snip

LPC_SWM->PINASSIGN[0] = 0xFFFFFFFF; //reset UART0, to reconfigure pin 13 and 18.

I'm leaving this here for future travelers.  Read chapter 8, know thy chip!

View solution in original post

2 Replies
148 Views
brant
Contributor I

I was able to make PIO0_13 and PIO0_18 work just fine as GPIO lines.  The answer lies in the UM10736 manual in chapter 8 regarding the SWM. 

The answer lies in the PINASSIGN0 register by putting that register in reset I was able to get those lines to function as GPIOs

//snip

LPC_SWM->PINASSIGN[0] = 0xFFFFFFFF; //reset UART0, to reconfigure pin 13 and 18.

I'm leaving this here for future travelers.  Read chapter 8, know thy chip!

View solution in original post

147 Views
soledad
NXP Employee
NXP Employee

Thank you for your input. 

Regards

Sol 

0 Kudos