Content originally posted in LPCWare by ianholmes on Fri Mar 08 05:54:18 MST 2013
Thanks.
In case anyone comes here after a link to EEPROM/Flash programming/debugger issues.
It is vital, and not well documented, that the EEPROM status flags are cleared whenever access is made to it. Primarily this refers to bits 26 and 28 (of the EEPROM Status register). If either flag is set then it is not possible for the IAP Flash programmer (that is used to download via SWD) to reprogram the application.
It seems that the Code Red environment we use does not reset the target unless it can not communicate (found with a fast scope and confirmed with a logic analyser), so this becomes difficult to recover.
To recover follow this process:
Attempt to download (fails and "no dissembly available" message appears usually
Assert the ISP pin (pull low)
Now click the reset icon in the debug section (to the left of the green start arrow), NOT THE STOP (red square). This should reset the target which will enter ISP mode at this point. Now the target is in ISP it is safe to halt the debug session
Press the RED stop square icon to stop debug session
Down load the new application. This will attempt to run but will have no sorce because the ISP is still set.
PAUSE the debug session
Remove the ISP assert
Click the Restart icon
You should be now executing your new code.
I'm sure this repeats information that is already posted, but hopefully it explains it in a way that shows why the process is in this order. What we are doing is following the boot process flowchart in the ARM manual and taking advantage of the ISP route. :)