Flash Magic Forum

Archive => Old Topics => Topic started by: Saurabh Mukadam on September 05, 2003, 03:34:38 AM

Title: Execute Command
Post by: Saurabh Mukadam on September 05, 2003, 03:34:38 AM
What exactly EXECUTE command/instruction do in flash Magic that makes 89C51Rx2Hxx device restarts with the new application. What is the command sent to 89C51Rx2 when EXECUTE command/instruction is executed ?
Title: Re: Execute Command
Post by: Andy Ayre on September 15, 2003, 02:45:12 PM
The execute command programs the status byte to zero and then sends a command to ensure the watchdog is turned on. Once the watchdog times out, the device will reset and execute your code.

Title: Re: Execute Command
Post by: Saurabh Mukadam on September 17, 2003, 01:27:32 AM
Hi Andrew,

Thanks for information. Can you tell me what is the exact command to be sent on serial port to turn on watch dog inside RX2.
Title: Re: Execute Command
Post by: Andy Ayre on September 18, 2003, 08:51:02 AM
:02000005800178

Rx2/66x rev G and later ONLY. This command only performs the reset.

Title: Re: Execute Command
Post by: Ingo on September 19, 2003, 02:18:03 AM
Hi Andrew
Looking in the application note AN461_9.

:02000005800178

0001 = read signature byte
Title: Re: Execute Command
Post by: Andy Ayre on September 19, 2003, 08:18:44 AM
Because of the extra bit that is set - it turns on the watchdog.

No, it isn't possible or necessary to do this via IAP. You simply turn on the watchdog yourself and let it time out. Or use a jump to zero after messing with the interrupts, etc. More info on that method on www.8052.com. I have always found a watchdog reset to be the easiest and most reliable.

Title: Re: Execute Command
Post by: erik malund on September 19, 2003, 10:23:53 AM
"You simply turn on the watchdog yourself and let it time out.
 Or use a jump to zero after messing with the interrupts, etc.
I have yet to see method 2 working without extensive effort to get all the things right.  So why on earth even try when method 1 is dead easy.

Erik
Title: Re: Execute Command
Post by: Andy Ayre on September 19, 2003, 10:35:37 AM
I agree. I've never liked method 2. But some people like to punish themselves... :)

Title: Re: Execute Command
Post by: Saurabh Mukadam on September 22, 2003, 07:58:27 AM
Thanks Andrew/Erik for information. This will help me alot.