Flash Magic Forum

In-System Programming Support => LPC2xxx => Topic started by: dmitro on April 13, 2007, 08:39:05 AM

Title: LPC2368 and MCB2300
Post by: dmitro on April 13, 2007, 08:39:05 AM
I have Keil's board MCB2300 with lpc2368FBD100. And i can't load it by flashmagic. All harware is ok, bootloader starts and i can drive bootloader using FlahsMagicTerminal. The bootloader version 3.1 (command 'K'). The
devece ID is '100924197' (command 'J').
I wrote some communication log between FlahsMagic and lpc2368 while operation "Reading device signature..." :
FM send 'J'
lcp send 'J0 100924197'
FM send 'J' again ....

May be FM don't anderstand so long ID?

sorry about my english...
Title: Re: LPC2368 and MCB2300
Post by: Andy Ayre on April 16, 2007, 08:27:15 AM
Please generated a debug file as described here:

  http://forum.flashmagictool.com/index.php?topic=3272.0

and send it to me. Thanks.

Andy
Title: Re: LPC2368 and MCB2300
Post by: dmitro on April 17, 2007, 04:19:55 AM
Now I understand what happened...
Booter v3.1 don't echo the '\n'.
If you send "J\r\n" the answer is:
"J\r0\r\n100924197\r\n" instead
"J\r\n0\r\n100924197\r\n".
All ather command is the same - no symbol '\n' in the echo...
I try 3 utilites for isp ("FM","LPC2000 flash utility","lpc21isp") and all of them send and wait '\n'.:(
Now i try to patch the open source lpc21isp...
Title: Re: LPC2368 and MCB2300
Post by: Andy Ayre on April 17, 2007, 08:30:01 AM
From your debug file it looks like the device has already autobauded (using some unknown baudrate). Can you please generate the debug file again, but this time ensure the device is being placed into ISP mode before Flash Magic communicates with it.

Maybe there is a glitch on the RxD pin during reset or power up, which starts the autobauding process without you knowing?

You can manually performing the autobauding using a terminal program, for example Hyperterminal.

I wouldn't waste your time patching code because you have a fundamental problem that won't be solved with software.

Andy
Title: Re: LPC2368 and MCB2300
Post by: dmitro on April 18, 2007, 03:43:16 AM
Ok, I send another file to you. There are no glitches on RX (I use oscilloscope).
The booter started. I use BusHound utility and saw "?" -> "Synchronized"

But i think the booter v3.1 have a bug:
Booter receive first '\n' or '\r' and ignore the next one! No echo to ignored symbol.
For example:
if you send "J\r\n" the echo is "J\r"
if you send "J\n\r" the echo is "J\n"
if you send "Synchronized\r\n" the echo and answer is  "Synchronized\rOK\r\n"
I waste some time and patch the lpc21isp. I change "\n\r" in all commands to "\n" and some other changes in sector size table...
And it work!!! Now I can write the flash. But lpc21isp not so comfortable as FM... :(

Title: Re: LPC2368 and MCB2300
Post by: Andy Ayre on April 18, 2007, 09:45:14 AM
Yes, you have identified the problem. The advice from NXP is to put a scope on the TxD pin and try to see if the missing character is actually being transmitted or not. This will tell us if the problem is in the device or not.

We've had one other person report this exact same problem, but with an LPC2378. However NXP and ourselves cannot reproduce it, unfortunately.

Andy
Title: Re: LPC2368 and MCB2300
Post by: dmitro on April 20, 2007, 04:27:18 AM
Thanks for you answer.
Yes, the problem is in device. Some peaple report the same bug in lpc2103. Look: http://tech.groups.yahoo.com/group/lpc21isp/message/174
I have device with booter version 3.1
What version of booter do you use? May be you device has another booter version?


Title: Re: LPC2368 and MCB2300
Post by: Andy Ayre on April 20, 2007, 09:09:55 AM
I've passed the yahoo discussion onto the engineers at NXP.

My LPC2129 which works fine is using bootloader version 1.63.

Andy
Title: Re: LPC2368 and MCB2300
Post by: bruce on August 20, 2007, 10:43:14 PM
Has there been any advancements on this front? We are experiencing this exact problem.

At the yahoo group posted by the original poster, there is a new post stating that the issue can be worked around by disabling echo on the device.

http://tech.groups.yahoo.com/group/lpc21isp/message/176

Any chance that this could be implemented in FlashMagic?

Thanks,

Bruce.
Title: Re: LPC2368 and MCB2300
Post by: Andy Ayre on August 20, 2007, 11:02:18 PM
By disabling the echo Flash Magic has to guess how quickly it can send data. Unfortunately that also seems to cause a problem.

Andy
Title: Re: LPC2368 and MCB2300
Post by: bruce on August 23, 2007, 12:05:24 AM
Thanks for the reply Andy.

So is there a solution in the works?
Title: Re: LPC2368 and MCB2300
Post by: Andy Ayre on August 24, 2007, 09:01:17 AM
Hopefully but there is no ETA yet I'm afraid. :(

Andy
Title: Re: LPC2368 and MCB2300
Post by: dimbasco on August 28, 2007, 07:35:12 AM
I am having the same problem, however need to get this to work till
dmitro  will you be able to post the modified lpc21isp that works.

Thanks!!
Title: Re: LPC2368 and MCB2300
Post by: Andy Ayre on December 13, 2007, 01:14:30 PM
Version 4.10 of Flash Magic should work around this problem. Please give it a try and let me know.

Andy