lpcware

ISP mode problems LPC1114

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by victorpau on Sun Oct 17 23:26:11 MST 2010
Hello,

I've been trying to write my own ISP routine for the LPC1114. I have an ARM processor that is connected to the LPC1114 and has to program it.

I generated the binary code from LPCXpresso and called the checksum program to get the right checksum, so that part should be fine.

Then in my code I get all the messages OK\r\n and 0\r\n, so it must be fine, the only thing that makes me worried is that sometimes the LPC1114 replies a Ok when it was supposed to reply a 0. Per example, after SYNC I have the programming sequence:

"W 268437504 128\n"

Reply: "0\r\n"

Then I send the 3 lines of UU encoded data with 45, 45 and 38 bytes of raw data converted to UU encoding starting with the Lenght of the line + 32, then the data and at the end \n.

Then I send the checksum of the line, and the answer is:

"OK\r\n"

Then, I assume this command is over, so I just ask for a new writing in memory. So I can achieve the 256 bytes necessaries to make the first transfer to flash.

"W 268437632 128\n"

Reply: [COLOR=Red]"OK\r\n"[/COLOR] An this seems to be wrong, I should be expecting a "0\r\n" here.

It can happen that this time I get the 0 but in some later reply I get a OK from a command that should be transmitting a 0.

I've the echo off and I'm using a speed of 115200bps. I'm waiting 100mseg between this memory writing commands.

If someone has some idea or some advice of what can be my problem I'll be really grateful. If there is any library or source code of how to do this in C it would be great.

Thank you in advance,

Victor Pau

Outcomes