Unable to program LPC2138FBD64/01 - Operation Failed. (programming - failed ...)

Started by bln, November 12, 2009, 02:57:36 AM

Previous topic - Next topic

bln

I'm trying to program a LPC2138FBD64/01 using Flash Magic v5.40.1801, but the programming fails. I can read the device id and security.

Manual start of boot loader mode. (P0.14 low while Reset goes high)
1) Read Device Signature -> ok
2) Read Security -> ok
3) Start flashing -> Operation Failed. (programming - failed to send data to the device)

LPC2138FBD64/01
Device ID: 0x0002FF25
Bootloader Ver. 2.12

COM port 1.
Baud Rate 115200
Interface None (ISP)
Oscillator (MHz): 14.7456

Hex File: C:\ProgramTest.hex

I have tried other Baud Rates without any luck.

Regards
Bent Nielsen

Andy Ayre

When you go to ISP -> Read Security what does it say in the window? Flash Magic thinks that the CRP level is set to 2 or 3, stopping any writing to flash.

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

bln

Thanks, I needed to "Erase all Flash+Code Rd Prot" to be able Flash.

Regards
Bent

Quote from: Andy Ayre on November 12, 2009, 07:48:37 AM
When you go to ISP -> Read Security what does it say in the window? Flash Magic thinks that the CRP level is set to 2 or 3, stopping any writing to flash.

Andy

drogy

Hi. I'm having the same problem with a LPC-H2148.
i can read and erase it but programming fails.
when i check security it sais "CRP is disabled"
using  "Erase all Flash+Code Rd Prot" doesn't change anything - programming fails.

Andy Ayre

What do you mean "programming fails"? What is the exact error message?

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

drogy

Start flashing -> Operation Failed. (programming - failed to send data to the device)

Andy Ayre

Embedded Systems Academy, Inc.
support at esacademy dot com

drogy

thanks andy, but i eventually got it working. i really have no idea what was wrong. what i did different (which is not to say this was the problem) on the second day of attempts:
i installed the lpc2000_flash_utility - but it doesn't support lpc2148 (i'm thinking maybe it made some changes to the system)
i powered on the lpc2148 before plugging in the rs232 shifter.
tried again using flash magic (same version, same system)
that's it. worked like a charm.

Andy Ayre

So to confirm - you can now use Flash Magic without any problems and without running the LPC2000 flash utility, even after rebooting your PC?

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

erazer

I had the same problem with Flashmagic and LPC 2184...
The workaround from drogy did work, but i have no clue what the LPC2000 flash util changed in my configuration...
I just installed it and started it once..
Then flashmagic could do the programming without any problem (LPC2000 tool was not running in the meanwhile)...

Andy Ayre

Please confirm - even if you turn off your PC and turn it back on again, without runnin the LPC2000 program Flash Magic works ok?

When you started the LPC2000 program that one time did you do anything with it? What exactly did you click on or perhaps change? Did you try to communicate with the device? If so which device did you select in the program?

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

erazer

Hello Andy!

Yes i can confirm, after rebooting the pc i only started Flashmagic, LPC2000 Tool was NOT running...

Before rebooting i only ran the LPC2000 tool, looked a bit at the different controls and figured out that the LPC2148 was not in the ComboBox, therefore i just exited and rebooted, as drogy wrote...

I did not try to communicate with the device since i did not find it in the ComboBox of the tool...

Maybe the LPC Tool makes some changes in the registry or installs some drivers that made it work, but i'm sorry i can't tell exactly what the root cause is...

Andy Ayre

Very strange. We will see if we can take a closer look, however we have never seen this ourselves so reproducing it will be very difficult.

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

lpc1766

I had the same Error Message, but the Reason was another.

I started programming with the "GettingStarted" Demo from IAR Compiler.
The Configuration for the Project is set by default to "RAM Debug". So the generated hex-File seems to want to programm the RAM what appears to be the Reason for the Error.
With the "Flash Debug" Setting, it works fine :)