Read Flash Memory?

Started by DieBaas, November 24, 2009, 10:10:48 PM

Previous topic - Next topic

DieBaas

Why is the Display Memory function in Flash Magic disabled. I want to read the flash of a 89LPC938.

Thanx

Andy Ayre

Because it's not supported. Flash Magic can only support the commands shown in the device user manuals from NXP.

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

DieBaas

So how do I read the flash memory after I've programed it? Any suggestion. I don't have a ICP programmer, but will reading the flash be possible with one?

PS: Sorry about the topic thing. Will start a new one next time. :-[

Andy Ayre

Use the CRC feature to check that the CRC of your device matches the CRC of your hex file.

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

Ralf_Brandt

Strange!
Maybe you need to get an updated Doc from NXP.

The Bootlodercode supplyied by NXP does contain a
Function 09 -Read User

And if I open a Terminal and type in:
:0500000900000fff00e4
I will get a perfect Memory Dump.
Tested with a brand new 89LPC921.

So at least the current 921 do support memory read.

Regards
Ralf

Andy Ayre

As I said before, FM only supports the documented commands. If you can find that command in an NXP document please post a link to it. If you want to rely on an undocumented command it's possible with a terminal program.

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

dptxp

This is bad. This means that anyone can read the code. And there is no way to stop this.

Ralf_Brandt

no it isn't.
Use the security bits, thats what they are for.

dptxp

Security bit 1 stops movc from the sector in which it is set, bit 2 stops erase and program, bit 3 makes device useless for ISP.

So with movc to use and ISP to be enabled, only bit 2 set in all sectors except the one with ISP, can be a bit of help.

There is no read option, except the way given in the post (do not know if it is true), so there is no read protection bit.

Ralf_Brandt

ISP FN 9 read user memory will use IAP FN 7

"      mov   DP0H, R4   ; Data Pointer High Byte
      mov   DP0L, R5   ; Data Pointer Low Byte
      clr   A
      movc   A, @A+DPTR
      mov   R7, A
      ret
"
And IAP FN 7 will use movc, so Bit 1 will work

dptxp

Actually they are bits 0 to 2, I had also made the same mistake.
So Bit 0 (not 1) is to disable movc. But how can one set it if movc is used in the software?
The software will not work.

dptxp

Quote from: Ralf_Brandt on May 03, 2010, 12:45:54 PM
Strange!
Maybe you need to get an updated Doc from NXP.

The Bootlodercode supplyied by NXP does contain a
Function 09 -Read User

And if I open a Terminal and type in:
:0500000900000fff00e4
I will get a perfect Memory Dump.
Tested with a brand new 89LPC921.

So at least the current 921 do support memory read.

Regards
Ralf


There is no such doc, please give link if there is one.

frank

Quote from: Ralf_Brandt on May 03, 2010, 12:45:54 PM
Strange!
Maybe you need to get an updated Doc from NXP.

The Bootlodercode supplyied by NXP does contain a
Function 09 -Read User

And if I open a Terminal and type in:
:0500000900000fff00e4
I will get a perfect Memory Dump.
Tested with a brand new 89LPC921.

So at least the current 921 do support memory read.

Regards
Ralf

Hi Ralf_Brandt,

Can you upload the latest bootloader code from NXP?
make MCU alive!

Ralf_Brandt