I want to use 20 TSSOP pin new LPC802 series and my pin requirements are not enough.
only way to use 20 pin package is to change SWD pin to GPIO at runtime,
I found below explanation at user manuel of LPC800 but I wonder if there is an ready example code for this
7.3.3 Changing the pin function assignment Pin function assignments can be changed “on-the-fly” from one peripheral to another while the part is running. To disconnect a peripheral from the pins and change the pin function assignment, follow these steps: 1. Enable the clock to the switch matrix. 2. Find the pin assign register for the current pin function. For example, register PINASSIGN0 for pin function U0_RXD. 3. Set the corresponding bits in the PINASSIGN register to their default value 0xFF. 4. Clear all pending interrupts for the disconnected peripheral and ensure that the peripheral is in a defined state. 5. In the pin assign register for the new pin function, program the pin number. 6. Disable the clock to the switch matrix