89C51RD2 erasing problem

Started by Buck Research, October 23, 2006, 03:27:50 PM

Previous topic - Next topic

Buck Research

I have been using Flash Magic for years, and before that WinISP. I just downloaded the latest version of FlashMagic and appear to be having a problem with the erase feature on it for the P89C51RD2 chip. When I try to erase blocks 0-8 of the chip, either manually or using the erase blocks used by hex file (0x0000 to 0x8FFF), instead of erasing just those files, it also erases blocks 9, 10, 11 and 12, which is where my lookup tables, etc. are and I do not want erased. What is going on? Any ideas?

Update, I tried back as far as 3.22 on Flash Magic and it does the same thing. I think it is just when you try to erase block 8, it erases the whole 16 kB block like it thinks it is an old RD2HA chip.



Post Edited (10-23-06 15:42)

Andy Ayre

So to confirm:

1. Program device
2. Go to ISP -> Display Memory... and confirm that blocks 0, 9, 10, 11 and 12 are programmed
2. Go to ISP -> Erase Flash...
3. Select only block 8 to erase and erase it
4. Go to ISP -> Display Memory...

You now see blocks 9, 10, 11 and 12 erased?

Which device are you selecting in Flash Magic? It should be the 89C51Rx2xx if it is one of the new ones. The list of blocks in section 2 of the main window should correctly reflect the flash block arrangement in the device.

Embedded Systems Academy, Inc.
support at esacademy dot com

Buck Research

I did all of those steps. I am familiar with the change from the old RD2Hxx chip to the plain RD2xx chip, and that is what I selected. The list of blocks is correct, but for some reason, erasing that 9th block also erases 10,11 and 12. Had not noticed this before because my code used to fit in the first 8 blocks, and only recently grew to use the 9th block. Also just updated the program on the computer I use to program the chips last week from a 2.40 version of Flash Magic.

erikm

is it just possible ....
that with certain security bits set FM will show the sectors erased evrn though they are not?

Erik

erik

Buck Research

I have a temperature lookup table in the 11th and 12th blocks, and when I erase block 9, I no longer have a termperature when I run my program on the microcontroller. It is definitely erasing those blocks. When I looked at it with the display flash memory function in FM, those blocks show all FFs, when before they had floating point numbers.

John

Andy Ayre

Please complete the following steps:

1. Program your lookup tables and application.

2. Press F1 to enter debug mode ([Debug] appears at the top of the window)

3. Go to ISP -> Display Memory and view blocks 8 and 9.

4. Go to ISP -> Erase... and erase block 8.

5. Go to ISP -> Display Memory and view blocks 8 and 9.

6. Close FM.

7. Email me the generated debug file C:\flashmagic.fmd and then delete it.

My email address is at the bottom of this post and in the Help -> About window.

Embedded Systems Academy, Inc.
support at esacademy dot com