AnsweredAssumed Answered

Forcing a Software Reset

Question asked by Dave Miller on Jun 11, 2009
Latest reply on Jun 12, 2009 by Dave Miller

Hello All,

 

I have searched the Forum but I don't see an answer to my particular situation so I am hoping someone out there has done something similar.

 

Processor - 56F8323

Codewarrior Version - DSC56800/E 8.1.1a

 

I use a section of the Data FLASH to store some configuration data.  What I am trying to do is to implement a Factory Reset where this data is erased and then I need to restart the code so that way the Firmware will think it was just powered up for the first time after assembly.

 

I can erase the FLASH but my issue is with how to restart from address 0x0000.

 

1) I turned on the Watch dog and the plan was to just sit in a loop until the Dog caused a reset after I erase the FLASH.  The problem I am having is the Dog seems to reset the code everytime I break in Debug mode.  I know the datasheet specifically says the Dog's timer stops running when halted in debug but for some reason it is still running and I am getting a reset.

 

2) With the Watchdog not doing what I want then my next attempt at a solution is to erase the FLASH then execute a reset command.  I have not found any kind of method to perform a Software reset.  I looked for an ASM opcode, a Reset Macro or function but I am just not seeing anything.

 

So my question is - Can someone point me to some good information on how to fix the Watchdog when in Debug mode OR can someone point me to a good software reset method?

 

Thanks in advance.

Outcomes