Author Topic: Why won't 89LV51 enter ISP mode?  (Read 6502 times)

GeeMott

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Why won't 89LV51 enter ISP mode?
« on: November 17, 2006, 06:54:14 am »
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

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2167
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Why won't 89LV51 enter ISP mode?
« Reply #1 on: November 17, 2006, 07:28:55 am »
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

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: Why won't 89LV51 enter ISP mode?
« Reply #2 on: November 17, 2006, 07:46:57 am »
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

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2167
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Why won't 89LV51 enter ISP mode?
« Reply #3 on: November 17, 2006, 07:52:12 am »
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

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: Why won't 89LV51 enter ISP mode?
« Reply #4 on: November 17, 2006, 08:32:35 am »
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

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2167
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Why won't 89LV51 enter ISP mode?
« Reply #5 on: November 17, 2006, 08:37:05 am »
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

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: Why won't 89LV51 enter ISP mode?
« Reply #6 on: November 17, 2006, 09:37:39 am »
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

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2167
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Why won't 89LV51 enter ISP mode?
« Reply #7 on: November 17, 2006, 09:43:06 am »
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