Content originally posted in LPCWare by bavarian on Mon Jan 26 05:26:57 MST 2015
If you did not program any OTP bits which prevents access through JTAG/SWD, then normally you can use the ISP mode to recover from such a situation.
[list]
[*] If you connect P2_7 on ball C10 to GND during power-on (or reset), the bootcode enters ISP mode, waiting for a connection setup on USART0.
[*] If you have USART0 available, you can use the tool Flash Magic to program new software, erase the SPIFI etc.
[*] For JTAG/SWD access this ISP mode should have a positive effect as well. The bootloader hangs forever in a loop, waiting for a sync character on USART0. This is a pretty clean system state, maybe in contradiction to your user software in SPIFI. Maybe it crashes, maybe it goes into power-down, some sort of system state where the JTAG/SWD access is no longer possible.
[*] My usual recommendation: insert a long wait loop at the beginning of your software (e.g. 3 seconds), then a debugger can catch the chip during this period before maybe something dreadful happens which disables the JTAG access somehow.
[/list]
Regards,
NXP Support Team