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
Solved! Go to Solution.
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!
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!
Thank you for your input.
Regards
Sol