Target marked as non debuggable
To be able to debug the ARM processor or write the flash in the LPC microcontroller, it must be possible to connect to the processor. A few reasons exist why this could fail:
- Code Read Protect is enabled
- Current software in the microcontroller 'hangs' the debugger
- Not enough power available, the ARM processor is unstable
- a hardware problem.
Code Read Protect
There are three levels of Code Read Protection, named CRP1, CRP2 and CRP3. All levels disable the JTAG port so it is not possible to debug a program when any of these CRP modes is active and it is also not possible to read the flash content via the ISP mode. With CRP1 it is possible to erase and write individual flash blocks, CRP level 2 only allows erasing of the complete flash and CRP3 completely disables the ISP mode.
When CRP level 3 is used, it is not possible to recover a programmed target.
When programming your own devices, this most likely is not the case.
Current software 'hangs' the JTAG debugger
Well known examples of this is when the program selects a clock source that is not available (e.g. when the main crystal is not available or not working) or when the PLL is programmed with invalid values.
If this is the case, the target can still be re-progammed by placing the controller in ISP mode. To enter ISP mode, the ISP pin needs to be pulled low followed by a hardware reset (apply power or pull the reset line low).
When using the Embedded Artists base board, the BL-EN switch on the top-left side of the board pulls the ISP pin low.
Note that the LPC1769 module uses a different pin to access the ISP mode. Either pull pin 51 on the LPCXpresso module low.
Not enough power available
Some laptops or bad USB cables may cause problems with the power to the LPCXpresso module.
When writing flash the LPC chip uses more power and this may result in different error messages. When seeing this error, use a different USB port on your laptop or try to apply external power.
This does not happen too often but it is of course possible that there is a real problem with the hardware. In this case try a different LPCXpresso module.