How to Erase Flash in ISP mode [LPC1778]

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Erase Flash in ISP mode [LPC1778]

831 Views
lpcware
NXP Employee
NXP Employee
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,
Vinay
Labels (1)
0 Kudos
3 Replies

673 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Jun 02 10:24:29 MST 2015

Quote: vinay.madapura
The datasheet says one can not enter ISP mode if the CRP-3 is activated. How will I know if I have done so?



In CRP3 your MCU is locked and there's no further access with SWD or ISP possible...

Are you sure that you are booting into ISP and your UART converter is working?

Could you ever erase / flash this board with FlashMagic?
0 Kudos

673 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vinay.madapura on Tue Jun 02 09:52:15 MST 2015
Hi R2D2,

Thanks for the quick response.

Yes, I tried different baudrates from 9,600 up until 57,600.
For all the baudrates, I get the same error.

In the meanwhile I read something about CRP functionality. I am sure I have not described that. But I want to check if I have entered the CRP-3 level.
The datasheet says one can not enter ISP mode if the CRP-3 is activated. How will I know if I have done so?

Thanks,
Vinay
0 Kudos

673 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Jun 02 09:23:02 MST 2015
Did you reduce the baudrate?

UART ISP must be used at 57,600 bits per second or a lower communications speed.


See: http://www.lpcware.com/content/forum/lpc1788-isp-autoboaud-issue
0 Kudos