P89C51RD2FA comm errors

Started by ALE_FM, June 26, 2006, 11:43:19 PM

Previous topic - Next topic


I use a PCB with an external Watchdog and Flash Magic tool to programm a P89C51RD2FA micro.
Before programming I disable the watchdog by setting a jumper in my programming PCB.
Everything is ok, an I can programm and reprogramm the micro several times.
But sometimes the communications with the micro is lost, anf after that I can no longer programm the same micro I could before.
It seems to me that the jumper in my PCB fails to connect while trying to programm the micro, and after that I have always the same message: "Unable to connect at the specific baud rate. Try reducing the baud rate. Reset the hardware into ISP mode again".
It is not a problem on my PC or in the cable, because when I put a new micro in the PCB and connect the jumper to disable the watchdog, everything is ok.
But, what can I do to programm again the first wrong micro?
I have tried with some ISP functios but always the same message is returned.
Is it a problem with the bootvector?

Jan Waclawek

> Is it a problem with the bootvector?

It sounds so.
Do you use the "erase all" option?

Jan Waclawek

PS. Do you have a board where you could run the controller from external program memory?

Post Edited (06-27-06 00:15)


Many thanks

Yes, I have used the "erase all" option, but nothing happens.
Any of the several ISP functions that I have tried work.

I have just tried to run the microcontroller with M27C512 external memory  and using the micro I can not reprogramm. It works properly. But this is not my final design. In my design I must use the on-chip flash memory.
Is there any function to perform an overall reset of the micro?
The ISP "Start Bootloader" function does not work.
If the bootloader is lost, how can I transfer it again to the micro?

Jan Waclawek

The bootloader is not lost (AFAIK it is in ROM); most probably this is the typical case of infamous "bootvector loss".

During bulkerase, both the data flash and the bootvector gets erased, but that process takes some time. Normally, after bulkerase, the internal bootloader restores the default bootvector (and status byte) automatically after the bulkerase finished. But, if during the bulkerase is in progress, the watchdog kicks in, or any other reset occurs (e.g. poweroff), there is nothing which can restore the bootvector (it remains in erased state, which is 00).

The easiest and safest way to "revive" the chips is to get access to parallel programmer capable of programming these chips (you can try some local programmer vendors, they sometimes provide chip programming as a service, or you can simply try to "talk them" into reprogramming a few of your chips).

With some hints from the 8052.com forum I have experimented with a "bootvector restorer" run from external program memory and I succeeded. However, I had only a P89C51RD2Hxx chip (mind the H in the suffix), which is an older revision than the H-less. So, if you are interested and wish to experiment, drop me an email, I'll send you the details.

Jan Waclawek


Many thanks Mr. Waclawek,

I'm interesting in trying this bootvector restorer.
How can I get your email address?