lpc2478 ISP problem.

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

lpc2478 ISP problem.

694 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Hannibal Smith on Thu Jun 11 11:16:57 MST 2015
Hello, I'm try to using ISP with rs232 flashmagic terminal, with a LPC2478 device.
I set com port like picture attached, and sent command like i've found in pdf, but device give me strange answers, as you can see in the picture. I tried to do a full erasing and program by flashmagic successfully. i don't understand where is the problem. anyone can help me?
Labels (1)
0 Kudos
6 Replies

550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Hannibal Smith on Tue Jun 16 06:05:50 MST 2015
yes, i check. i solved changing the RAM address for writing, maybe lpc use the first 512 byte for bootloader or similar...
then I tried to move the data  I write in to the flash: so I perform that:
U 23130 ; Unlcock
P 0 27 ; Prepare to Writing
E 26 27 ; Erase sector that need to be writing
P 26 27
C 508416 1073742304 512 ; Move 512 byte from Ram to Flash
LPC return always 0 or OK and no error!
then I read 512 from ram and flash and data match; but when I unplug Power supply and connect Jtag for read enteir chip memory I don't find the writed data, but only the erase sector.  This MCU is very strange for me...
0 Kudos

550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dmitryf on Mon Jun 15 20:18:33 MST 2015
Do you check XON/XOFF characters from the device? May be your data come very fast...
0 Kudos

550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Hannibal Smith on Mon Jun 15 00:32:05 MST 2015
Thanks, I've already check this AN; I need to clear (put FF) 256 byte in RAM, so i sent 8 time instruction for write 32 byte like in the AN. checksum for 32 byte FF is 8160 and lpc sent me ok the first 3 time, but the it answer me RESEND, the command that i send is the same that 3 first time. 
0 Kudos

550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dmitryf on Sun Jun 14 20:01:19 MST 2015
Please check this document: AN11229.

5.3 Writing to RAM
The command format to write to the RAM is as follows:
W <start address> <number of bytes>
<address> is the desired address in decimal. The address must be a word boundary.
<number of bytes> is the desired bytes. The number of bytes must be in multiples of 4.
As an example, to write the value of 0x14, 0x0F, 0xA8, and 0x17 to the RAM address of 0x10000000, the following sequence occurs:
1. The host sends the command “W 268435456 4”
2. The controller responds with a Return Code
3. The host sends the data in UUencode format, “$%`^H%P``”
4. The host sends the checksum, “226”
5. The controller responds with an “OK” if the checksum matches the data. If the checksum does not match, then a “RESEND” is sent back to the host
0 Kudos

550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Hannibal Smith on Sun Jun 14 11:28:28 MST 2015
thanks, now i can comunicate with lpc. i've an other question: checksum that must be sent over 20 line need to be calculate on data bytes that i've sent or on all caracter that i've used in the isp comman?
0 Kudos

550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dmitryf on Thu Jun 11 19:01:20 MST 2015
You can check how work with ISP correctly by analyze lpc21isp project source code from the Sourceforge.
0 Kudos