Author Topic: Can't start ISP masked-ROM boot loader code ,P89C662HBA  (Read 21011 times)

a9o1o8o

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Can't start ISP masked-ROM boot loader code ,P89C662HBA
« on: November 19, 2015, 11:41:06 PM »
I need help about NXP MCU,P89C662HBA,which can start user's code but can't start ISP masked-ROM boot loader code.But why?even though I push PSEN pin to GND. when I want to down load my code,I have to push PSEN pin to GND in order to start ISP masked-ROM boot loader code,after a few sucess times,Now,fail to start boot loader code ,so I can't down load my code using this way. what's wrong my Behavior? I need Help.

I Push EA to VCC and PSEN to GND directly,Push ALE,P2.6,P2.7 to VCC through pull-up resistor,But I still can't down load my code

a9o1o8o

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
« Reply #1 on: November 19, 2015, 11:50:06 PM »
NOW, I still have a Good chip which I can Read device signature and bank check(Rxd,Txd,Gnd)

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
« Reply #2 on: November 20, 2015, 06:10:54 AM »
Put a scope on the microcontroller Rx pin and check it is receiving characters. Also measure the bitrate using the scope.

If that looks good then put your scope on the microcontroller Tx pin and check if anything is being transmitted. During the autobaud process with Flash Magic the device echoes back the characters it receives.

BTW please don't report your own posts just to try and get a faster response. Thank you.

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

a9o1o8o

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
« Reply #3 on: November 22, 2015, 06:52:44 PM »
OK I'm sorry for that behavior,Both Txd and Rxd pin will light corresponding LED if there have data.When I want to reload my codes(PSEN Low,EA/P26/P27 High),Microcontrollers sometimes run my previous code to send stable data(such as "test program") through Txd pin and sometimes do nothing for a while and then run my previous code to send stable data through Txd pin  .But Rxd pin everytimes have data.And everytime fail to reload my codes.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
« Reply #4 on: November 23, 2015, 03:34:56 AM »
LED is not enough to debug this problem, you need a scope on the pins and only look at the activity when Flash Magic is trying to connect. Please post waveforms showing the 'U' going in and the 'U' coming out.

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

a9o1o8o

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
« Reply #5 on: November 23, 2015, 07:19:58 PM »
Schematic

a9o1o8o

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
« Reply #6 on: November 23, 2015, 07:21:44 PM »
Debugging environment

a9o1o8o

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
« Reply #7 on: November 23, 2015, 07:36:05 PM »
because flash magic software so quickly that I can't capture waveforms in time ,so I use Serial debugging assistant software Send "U" persistent. The good chip will Reply "U". Good chip waveforms

a9o1o8o

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
« Reply #8 on: November 23, 2015, 07:39:30 PM »
Good chip Serial debugging assistant software Screen

a9o1o8o

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
« Reply #9 on: November 23, 2015, 07:40:38 PM »
May be bad chip waveforms

a9o1o8o

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
« Reply #10 on: November 23, 2015, 07:48:55 PM »
May be bad chip Serial debugging assistant software Screen On,the last picture upload failed. The picture is stable data which is not "U"

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
« Reply #11 on: November 24, 2015, 12:55:38 AM »
because flash magic software so quickly that I can't capture waveforms in time ,so I use Serial debugging assistant software Send "U" persistent. The good chip will Reply "U". Good chip waveforms

You need a scope that can trigger on an edge then show you what it captured. Essential for working with embedded systems.
Embedded Systems Academy, Inc.
support at esacademy dot com

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
« Reply #12 on: November 24, 2015, 12:58:38 AM »
Try using a terminal program such as PuTTY. Send a 'U' to the device and see if you get a 'U' back. Use 9600 baud then 19200 baud, 8N1. If you get that working then compare the waveforms at RxD and TxD with the ones generated by Flash Magic.
Embedded Systems Academy, Inc.
support at esacademy dot com