Author Topic: How does Flash Magic reset the P89C668?  (Read 6412 times)

Lynn Reed

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
    • Email
How does Flash Magic reset the P89C668?
« 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?

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2173
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: How does Flash Magic reset the P89C668?
« Reply #1 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.
Embedded Systems Academy, Inc.
support at esacademy dot com

Lynn Reed

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
    • Email
Re: How does Flash Magic reset the P89C668?
« Reply #2 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.