Why won't 89LV51 enter ISP mode?

Started by GeeMott, November 17, 2006, 06:54:14 AM

Previous topic - Next topic

GeeMott

uC: P89LV51RC2FA, PLCC44 pkg
VCC = 3.3V at pin 44 verified
VDD = GND at pin 22 verified
EA pin 35 at VCC verified
PSEN pin 32 is floating
XTAL1 pin 21 has 12.5 MHz square wave, 3.3v/GND
XTAL2 pin 20 floating
RST pin 10 has 10uF to VCC, 8250 ohm to GND
TXD pin 13 is, at the moment, floating

Start FlashMagic, see 4.808 KHz square wave, 3.3v/GND at RXD pin 11.
Bring RST to VCC (approx 2 nS rise time) for a time anywhere from 400 mSec up to several seconds.  Fall time is approx 100 mSec.

Nothing EVER appears at TXD, which stays at 3.3v. (Once it responds, I will reconnect it to my 232 driver and go from there).

I don't imagine the problem is in FlashMagic, but What Am I Doing Wrong?


Andy Ayre

Click on Start in Flash Magic. It will tell you reset the device, so reset the device only at that point.

Embedded Systems Academy, Inc.
support at esacademy dot com

GeeMott

Thanks, Andy, for the quick response.

However, that's what I'm already doing. When I see the string of U's (4.808 KHz square wave at 9600 baud), FM tells me to reset, and I do.  TXD won't budge.

Andy Ayre

Has the device ever been programmed before? Have you ever been able to communicate with it, even just briefly?

Embedded Systems Academy, Inc.
support at esacademy dot com

GeeMott

Not that I know of. It is possible that something was exchanged at the beginning of the evaluation process (this is a new design).  I didn't put myself into "troubleshoot mode" until I started having trouble.

(Time passes.)

Acting on your hint, I replaced the uC with a fresh one.  Hooray it did program! (Although it didn't like the device signature.)  So it was a bad or corrupted device?  Is it redeemable?  Did I do something to ruin it which I need to avoid in the future?

I've been beating my head against this for 2 days, and you put me right that quick. Can I send you some chocolate?


Andy Ayre

The 89V51Rx2 and 89LV51Rx2 devices do not have a device signature hard-coded into them, instead it is set in the bootloader. Originally NXP developed a single bootloader for all six devices in the family and the result was the same signature for all of them.

You have two choices:

  1. Go to the advanced options, misc table and disable signature byte checking

  2. Grab the latest 89(L)V51Rx2 bootloaders from the Flash Magic page (towards the bottom in the third party section) and program the correct one. The device signature will then be correct.

It is possible that your first device was accidentally programmed with the 89C51RC2 selected in Flash Magic. The result is that the device will end up in SoftICE mode. Search for SoftICE on the forum. Always make sure you have the correct device selected. Alternatively it might have been damaged by ESD.

Chocolate is always welcome.

Embedded Systems Academy, Inc.
support at esacademy dot com

GeeMott

Okay, a box of Godiva truffles is on the way. They are slow shippers so you can expect it just after Thanksgiving.

Now here's the next question, am I going to have to upgrade the bootloader on every unit I produce, before I can burn my application code?  I don't see any notes about  "units before a certain date code" or anything.

Andy Ayre

Heh, thanks. :)

You don't have to upgrade the bootloader if you don't want to. The only benefits from upgrading are:

  1. The device signature will be what Flash Magic expects (but you can disable the check)

  2. There are more ISP entry options (but you don't have to use them)

So upgrading is optional. I hope that helps.

Embedded Systems Academy, Inc.
support at esacademy dot com