Hi @ancymuhammed ,
When you use the LPC-LINK2, which firmware you are using? JLINK or CMSIS DAP?
When you meet the can't download issues, you need to do the flash mass erase at first.
When you use the LPC-LINK2 JLINK firmware, you need to make sure your app code don't contains the JTAG pin control, eg, the sdk, led_blinky, that will have influence to the LPC-LINK2 debugger, as the controlled LED is the JTAG_TDI.
Wish it helps you!
Best Regards,
Kerry