LPC2368 and MCB2300

Started by dmitro, April 13, 2007, 08:39:05 AM

Previous topic - Next topic

dmitro

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...

Andy Ayre

Please generated a debug file as described here:

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

and send it to me. Thanks.

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

dmitro

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...

Andy Ayre

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
Embedded Systems Academy, Inc.
support at esacademy dot com

dmitro

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... :(


Andy Ayre

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
Embedded Systems Academy, Inc.
support at esacademy dot com

dmitro

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?



Andy Ayre

I've passed the yahoo discussion onto the engineers at NXP.

My LPC2129 which works fine is using bootloader version 1.63.

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

bruce

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.

Andy Ayre

By disabling the echo Flash Magic has to guess how quickly it can send data. Unfortunately that also seems to cause a problem.

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

bruce

Thanks for the reply Andy.

So is there a solution in the works?

Andy Ayre

Hopefully but there is no ETA yet I'm afraid. :(

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

dimbasco

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!!

Andy Ayre

Version 4.10 of Flash Magic should work around this problem. Please give it a try and let me know.

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