Can't start ISP masked-ROM boot loader code ,P89C662HBA

Started by a9o1o8o, November 19, 2015, 11:41:06 PM

Previous topic - Next topic

a9o1o8o

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

NOW, I still have a Good chip which I can Read device signature and bank check(Rxd,Txd,Gnd)

Andy Ayre

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

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

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

Schematic

a9o1o8o


a9o1o8o

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

Good chip Serial debugging assistant software Screen

a9o1o8o


a9o1o8o

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

Quote from: a9o1o8o 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

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

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