Content originally posted in LPCWare by Daniel Widyanto on Mon Dec 10 21:17:29 MST 2012
Hi,
Once you enable the watchdog, you won't be able to turn it off. The problem is that when you are doing Flash programming using SWD, there are probability that your code to activate the watchdog already run, before the SWD is able to stop the MCU. Therefore, the MCU will be reset during Flash programming / erase (due to the watchdog).
To solve it, force the MCU to enter ISP mode first (ie. pull PIO0_1 LOW while RESET), before using the SWD to do the Flash programming.