Flash Magic Forum

In-System Programming Support => P89C51Rx+/P89C51Rx2/P89C66x/P89C6xX2/P89V66x => Topic started by: Lynn Reed on March 01, 2007, 07:57:54 AM

Title: How does Flash Magic reset the P89C668?
Post by: Lynn Reed on March 01, 2007, 07:57:54 AM
I am writing my own boot loader for a P89C668, and I would like for it to be backwards compatible with the Flash Magic tool. 

I noticed that Flash Magic has the capability to reset the P89C668.  I also noticed that the data sheet description of the supported ISP hex record commands does not include reset. 

So how do you perform a chip reset?  Are you making use of some of the undocumented ISP records and subfunctions?  And if so, which ones do I need to support in order to run Flash Magic?
Title: Re: How does Flash Magic reset the P89C668?
Post by: Andy Ayre on March 01, 2007, 09:26:14 AM
Yes, there is an undocumented command. If you set the top bit of the subfunction code then it enables the watchdog timer. However it is not possible to feed the watchdog via ISP... Flash Magic uses the command to read the device signature bytes when it wants to do this.
Title: Re: How does Flash Magic reset the P89C668?
Post by: Lynn Reed on March 01, 2007, 10:28:49 AM
I hoped that might be it.  I sure didn't want to deal with undocumented calls!

Thank you for your reply, Andy. 
You run a good forum, which supports Flash Magic quite well.