Version 4 of the bootloader in the P89V51Rx2 devices suffers from a couple of issues. To determine the version of your bootloader:
- Choose ISP -> Read Device Signature...
- The bootloader version will be displayed
Block 0 EraseVersion 4 of the bootloader has an issue with erasing block zero. The solution is to upgrade the bootloader.
Upgrading the BootloaderVersion 4 of the bootloader should be upgraded to version 5 first; see link (1). Follow the instructions. If it doesn't work then try a terminal program such as Hyperterminal to manually update the bootloader.
Once version 5 is installed it can be upgraded to version 7 using the functionality built into Flash Magic; see link (2).
Version 5 solves the block zero erase issue. Version 7 adds the option to use a pin to start the bootloader.
(1)
http://ics.nxp.com/support/documents/microcontrollers/all/?scope=P89V51RD2(2)
http://www.flashmagictool.com/resources.html