Author Topic: P89V51RD2 Problem  (Read 23636 times)

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: P89V51RD2 Problem
« Reply #15 on: January 23, 2008, 12:18:01 am »
And did using the DC power separate from USB alleviate your problems?
---
I don't quite understand what you mean "the bootloader destroys itself". Please comment.

JW
« Last Edit: January 23, 2008, 12:28:48 am by Jan Waclawek »

jcabral

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: P89V51RD2 Problem
« Reply #16 on: January 23, 2008, 10:03:47 am »
And did using the DC power separate from USB alleviate your problems?
---
I don't quite understand what you mean "the bootloader destroys itself". Please comment.

JW

A separate DC power doesn't solve the problem, in order to work I have to make changes to the development board: include a reset to the FTDI chip or include a oscillator based on an external crystal.

The bootloader has code in "user" program memory ... that code deletes itself after determining the baud rate, it does it very well from any garbage generated from the FTDI ... if the chip gets garbage from the serial port or Vdd is not 5.0V, that portion of code is deleted and a parallel programmer is required to recover. Furthermore bootloader v7 is only available for ISP upgrade, only v5 is available from NXP site.
What I will do asap is to modify the bootloader in order to be able to use 40 chips, or redesign a smaller development board with standard RS-232.
For the boards that I have now, and still intend to use (we have around 150 of these), I will buy parts from other manufacturer.

I attached the schematic of the circuit.

Regards,
JCabral

erikm

  • Full Member
  • ***
  • Posts: 113
    • View Profile
Re: P89V51RD2 Problem
« Reply #17 on: January 24, 2008, 06:17:18 am »
I have been looking for other manufacturers and I found that some have new bootloaders similar to this one, but they still keep the hardware ISP entry mode.

I am a great fan of the no hardware ISP entry mode (I created NoTouch for that reason) and think that Philips did very well with the ISP design of the V chips. However that seems not to be the case for some others so NXP had to come out with the VC series that have hardware ISP entry mode.

SO, if you prefer hardware ISP entry mode get a VC chip, they are supposedly identical to the C (non -H) series re ISP.

Erik
erik

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: P89V51RD2 Problem
« Reply #18 on: January 27, 2008, 11:24:01 am »
The bootloader has code in "user" program memory ... that code deletes itself after determining the baud rate, it does it very well from any garbage generated from the FTDI ... if the chip gets garbage from the serial port or Vdd is not 5.0V, that portion of code is deleted and a parallel programmer is required to recover.
The bootloader does not delete itself, nor does it have code in the "user" (application, Block0) FLASH. It is only the bootloader updater (from whichever to version 7) which is programmed into the application FLASH and, after having updated the boot FLASH, it erases itself. But that does not happen before it verifies the new bootloader to be programmed all OK.

However, with erratic power I can imagine any possible scenario. You need to fix that first.

Furthermore bootloader v7 is only available for ISP upgrade, only v5 is available from NXP site.
If you want to program the v7 bootloader in parallel programmer, simply take the updater as downloaded, take out the 0000-1FFF part off it, set the first 3 bytes to zero, and "burn" this into the boot FLASH. Note however, that in this way you will destroy the SoftICE code (the v5 bootloader programmed in parallel programmer into boot FLASH will do the same). If you want to preserve that, you need to read the boot FLASH first, store 0800-1EFF of it - that's the SoftICE part, concatenate it with 0000-07FF and 1F00-1FFF of v7 (zeroing the first three bytes), then program the whole back into the boot FLASH.

What I will do asap is to modify the bootloader in order to be able to use 40 chips, or redesign a smaller development board with standard RS-232.
For the boards that I have now, and still intend to use (we have around 150 of these), I will buy parts from other manufacturer.

Just out of curiosity: Atmel AT89C51RD2/ED2?

Jan Waclawek

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: P89V51RD2 Problem
« Reply #19 on: January 28, 2008, 07:34:25 am »
Note that the bootloader updater is designed to work with the corresponding feature in Flash Magic. Choose Update Bootloader from the ISP menu.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: P89V51RD2 Problem
« Reply #20 on: January 28, 2008, 11:06:18 am »
Note that the bootloader updater is designed to work with the corresponding feature in Flash Magic. Choose Update Bootloader from the ISP menu

Hummmm... Does this meant that there is any sort of magic performed by FlashMagic, other than "burn" the updater as it would any other application, then run it and re-autobaud?

Jan Waclawek

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: P89V51RD2 Problem
« Reply #21 on: January 28, 2008, 11:11:23 am »
No, but it's not necessary to modify the hex file so is a bit easier than using a parallel programmer.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: P89V51RD2 Problem
« Reply #22 on: January 28, 2008, 11:15:56 am »
No, but it's not necessary to modify the hex file so is a bit easier than using a parallel programmer.
Oh I see, thanks Andy.

Nevertheless it seems that some users do prefer parallel programming of the bootloader update, and possibly with the "bootloader entry on pin" option switched already on - I know it's beyond FlashMagic, it's just the defunct (or barely functional) NXP web and forum why these question gets asked here - there was an another separate thread about this topic recently.

Jan Waclawek