Flash Magic Forum

In-System Programming Support => LPC2xxx => Topic started by: Demis Biscaro on September 08, 2008, 07:23:11 AM

Title: LPC2378: problem with command line interface
Post by: Demis Biscaro on September 08, 2008, 07:23:11 AM
Hello to all the users of this forum! :)
I've a problem to erase LPC2378 CPU through Flash Magic command line.

If I start Flash Magic GUI and configure it with these parameters:

COM Port:          COM 1
Baud Rate:         19200 (or 57600, 115200, 9600)
Device:              LPC2378
Interface:           None
Oscillator (MHz):  12.000000

Advanced options: "Use DTR and RTS to control RST and P0.14" enabled

I can erase the flash memory of the CPU.

On the opposite, If I execute the following command line

FM DEVICE(LPC2378, 12.000000) COM(1, 19200) ERASE(DEVICE, PROTECTISP)

the operation fails with this response: "Connection failed: invalid command".
I've tried to set other baud rate and I've seen that only if I set a baudrate equal to 1200 b/s

COM(1, 1200)

the operation is executed correctly. Otherwise the operation fails.

I've tried also to power off and then power on the device before trying a new connection but I've obtained no results.

I don't understand why all works properly with GUI while I've that problem with command line.
Have you any suggestions?

Thank you,

Demis
Title: Re: LPC2378: problem with command line interface
Post by: Andy Ayre on September 08, 2008, 09:12:23 AM
In the GUI go to File -> Save Command Line Directives. Try using what the application generates. If it still doesn't work please post all the directives here so we can see what you are now using.

Andy
Title: Re: LPC2378: problem with command line interface
Post by: Andy Ayre on September 08, 2008, 09:13:32 AM
At a minimum you are missing the HARDWARE directive. See page 81 in the Flash Magic manual.

Andy
Title: Re: LPC2378: problem with command line interface
Post by: Demis Biscaro on September 09, 2008, 05:50:53 AM
Thank you!
I've used the 'Save Command Line Directives' and I've found that the HARDWARE directive is needed. After adding it the operation is executed correctly.

Thanks again and bye!

Demis