Content originally posted in LPCWare by bavarian on Mon Aug 12 09:13:01 MST 2013
Hello,
this sounds like a problem with the right order of shutting things off. Please check in detail what you switch off and in which order. If you shut off a clock which is required for a peripheral, then you will have problems to access this block later, because there is no more clock. I can't really explain the behavior of the debugger.
Attached is a small main.c file from one of my test setups. If you are interested in the complete project (it is for KEIL µVision 4.53), then please come back and I will prepare it.
Best regards,
NXP Technical Support Team