Author Topic: How to install new bootloader...  (Read 13476 times)


  • Jr. Member
  • **
  • Posts: 2
    • View Profile
How to install new bootloader...
« on: December 09, 2009, 03:22:42 am »
Hi i am doing programming with P89v51rd2 micro controllers.I have a usb programmer[TOP2049] using that i dumped some example codes to my p89v51rd2 mc [i have 3 units] and all are working fine [i tried LCD example,uart,i2c]. Now am thinking of working with the problem comes, I connected the IC to the Hyper-terminal and checked for the U .It is not coming.I checked uart and development board It  is working fine .So only reason what i am finding that My bootloader may get erased when i used the TOP2049 programmer.

I went to website and downloaded the P89c51 bootloader,
and Installed P89V51RD2_BL_V05.hex. after that also am not getting the U on hyperterminal

Now i suspect  i  burned the code in wrong block,which is the starting address for block1 ??

my  programmer is showing two blocks code[0000-7fff] data[1000-11fff] [check the image topwin.bmp]. I burned P89V51RD2_BL_V05.hex  to both memory location but then also it is not generating U

what will be the problem what is the configuration i have to keep
the configuration which i used now is shown in picture tpotwin .jpg
If i am burning the hex file P89V51RD2_V05_UPD_ISP.hex in the First block starting from 0000 then i ll get the message


ERASING SECTORS ... * * * * * * * * * * * *
Update of BOOTCODE is completed. Please reset system,
enter ISP mode, and use Reset Serial Number command to
erase Block 0.

 But still bootloader is not working from the flash magic. what will be the problem                   


Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2178
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: How to install new bootloader...
« Reply #1 on: December 09, 2009, 07:58:53 am »
The P8V51RD2 device uses 16-bit addresses, so an address range of 0x10000 - 0x11FFF is not possible. I'm guessing that it is how block 1 is presented to parallel programmers, but I don't know for sure.

In normal operation block 0 occupies 64kB for the RD2. Block 1 can be enabled to overlay the first 8kB of the address space so it can be accessed by writing to the FCF register. This is why the boot loader updater must be executed - to enable block 1 and program it. Details of this can be found in chapter 7 of the user manual from NXP.

As I have no idea what happened to your device when you used the TopWin software I think things have now become very confused. My only thought is that you are not activating the bootloader by sending a 'U' within the required time after reset.

Good luck.

« Last Edit: December 09, 2009, 08:01:07 am by Andy Ayre »
Embedded Systems Academy, Inc.
support at esacademy dot com


  • Jr. Member
  • **
  • Posts: 2
    • View Profile
Re: How to install new bootloader...
« Reply #2 on: December 09, 2009, 10:35:28 am »
Hi Andy,
                     Before programming with topwin 1 or two times I programmed 89v51rd2 fn with Flash magic at that time it was working fine.and Just for analyze I connected hyper terminal  and i could get U replay back from MC.

This time also am doing the same only .If am not invoking it correctly then anyway flash magic tool could invoke It and detect the processor rgt ?.but that is not happening

and wen i install  P89V51RD2_V05_UPD_ISP.hex and try to invoke it is printing the message?.

If  you can tell the starting address of block 1 then i ll burn the code in that address

or if anyone having a red copy of hex file plz send across it i ll try with that 



  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Re: How to install new bootloader...
« Reply #3 on: December 13, 2009, 04:17:36 pm »

I have an idea.
If your target doesn't run properly with Flash Magic,you can restore MCU flash by parallel programer.

1) download from

2) update bootloader
case 1) communication between MCU and Flash Magic is good.
 From flash magic Isp -> Update Bootloader, you can simply update latest bootloader.
case 2) communication between MCU and Flash Magic is no good.
 2-1) By parallel programmer, fill memory 0 to 11fff with 0xff
 2-2) download corresponding Hex file in above zip file to parallel programmer.
 2-3) overwrite 0x10000 to 0x10002 with 43 B1 02 (ORL FCF,#002H).
 2-4) put your MCU to programmer and erase and program and verify.
 2-5) put your MCU to your target board.
 2-6) power on your target board.
 2-7) From Flash Magic , Isp-> Read Device Sigcature