How to Erase Flash in ISP mode [LPC1778]

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by vinay.madapura on Tue Jun 02 09:11:33 MST 2015
Hello Community,

I am using LPC1778 in a custom board. I tried to debug/write into the Flash using LPC Link.
I am able to write to the Flash when I use a fresh board with no code in it. After the write is done, I get the following debug error:
"System rejected access at location 0xE000EDF0",
and the board doesn't come up. I can not re-write to the Flash afterwards.

The same code was working fine with LPC1754 earlier and then we had to change the controller for memory and functionality reasons.
I changed the headers, includes and such things. Found out the problem that I had wrongly configured the clocking. (I am a newbie).
I feel that these changes are sufficient for me to try on another board. But I don't want to unnecesarily spoil another board.

On a separate custom board(identical to the spoilt one), I tried to run an LPCOpen example: "periph_blinky" by modifying the PIN config. It runs somewhat successfully( Doesn't blink though, but I was able to write and rewrite the Flash many times and an LED also turns ON).

On the destroyed board, I tried to erase the flash in ISP mode using FlashMagic and grounding the P2[10] pin and that doesn't seem to work.
I get the "Failed to Autobaud." Error from FlashMagic.!!

Could anyone please shed some light on how to erase the flash so that I can first try the revised code on the already used board.
Please keep in mind while answering that I am a newbie.

Thanks in advance,