Content originally posted in LPCWare by CodeRedSupport on Thu Jul 01 07:05:49 MST 2010
When you change the clock speed and/or oscillator source, you are also changing the speed of the debug connection. As you are stepping the code when this happens, the debugger is no longer able to connect, as you have changed the connection 'under it's feet'.
The way around this is to set a breakpoint after you change the speed and RUN to the breakpoint. The debugger will then resync the debug connection, when the breakpoint is hit. This is not possible when single stepping.