ISP with an LPC1812 not working

Started by robert1356, May 15, 2014, 01:39:05 PM

Previous topic - Next topic

robert1356

I have received some new boards with an LPC1812 on them.  This is a custom board.  I have verified, using a terminal, that I can communicate with the ISP on the LPC1812.

Using FlashMagic, I can read the device ID and the CRP but that is the ONLY thing I can do that doesn't return an error.  When I read CRP on a brand new part (never programmed) it returns CRP Level 1 (I think it should be Level 0). 

I used a terminal to attempt to erase all flash.  This SEEMED to succeed, but when I tried reading CRP, it still showed CRP Level 1. 

Also of note, according to the NXP data sheet, the LPC1812 has only BANK A flash (15 sectors).  According to the ISP info in the LPC1812 data sheet, '0' should be used for BANK A in the 'P' and 'E' commands.  However, this returns a '7' (invalid sector).  If I use '1' I get the expected '0' return from the P and E commands.

Has anyone actually been able to successfully use FlashMagic to erase and/or program an LPC1812?  Is there a configuration file somewhere that I can try manually modifying?

I have attached a debug file from an attempt at using FlashMagic to erase the whole device.

Here is the erase sequence I executed from the terminal (the arrows are for information only):

--> ?
<-- Synchronized
--> Synchronized
<-- OK
--> 12000
<-- OK
--> U 23130
<-- 0
--> P 0 14 1
<-- 0
--> E 0 14 1
<-- 0

Thank you

robert1356

I'm beginning to feel pretty confident that there is an error in the LPC1812 documentation regarding Bank numbering.  I tried the following:

R 436208380 4   <-- this is address 0x1A0002FC (CRP address for BANK A)
1                        <-- Error Invalid Command
R 452985596 4   <-- this is address 0x1B0002FC (CRP address for BANK B)
0                        <-- success and the uuencoded data below is FF FF FF FF
$________
1020

Andy Ayre

In Flash Magic please choose the LPC1817 then activate bank B. Can you use the LPC1812 OK with those settings?

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com