Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/03/05 00:12
Modified:
  02/03/05 00:23

Read: times


 
#86426 - 'Warm reset', 'Early power fail'
Responding to: ???'s previous message
Stewart said:
Is it possible to get the microprocessor to run some code before it resets when the reset button is pressred?

Of course, this is possible. What you need is called a 'warm reset'. A 'warm reset' resets your application in a manner, that the micro isn't immediately stopped, but still does some rescue jobs, for instance storing important data into a backup memory.
A 'cold reset', on the other hand, would immediately stop the micro not allowing to do anything else.

Of course, a 'warm reset' cannot be invoked by pushing the reset button of reset controller, like MAX1232. This would automatically invoke a 'cold reset'. To implement a 'warm reset' an interrupt routine should be invoked. This could be done by using a 'warm reset'-button in combination with one of the two !INT inputs of micro. Another option could be a periodically polling of according port line.
The 'warm reset' could automatically invoke a 'cold reset' after accomplishing the 'warm reset' service routine. One methode to invoke a 'cold reset' is, to no longer strobe the watchdog, if used any.

This methode of using a special 'warm reset' button might not be enough to solve any reset refered problem. For instance, what if the micro is reseted by a power down invoked reset? In this case this would automatically be a 'cold reset', because the reset controller will manage this. If this shall be avoided, then you will need something, which warns you, that a power down reset will occur 'very soon', means what you need is an 'early power fail' signal. You could feed such a signal to the same !INT line, by using active-low wired-OR technique. A simple comparator detecting the signal at input of 5V voltage regulator could serve as an 'early power fail' signal.

If this 'warm reset' and 'early power fail' technique is not satisfying, you should think about providing your stepper motor with additional sensors, which allow you to determine what status the stepper motor is in, at every moment. Then, there would not be any need for properly initializing the stepper motor before invoking a 'cold reset'.

Kai



List of 19 messages in thread
TopicAuthorDate
running code before reset!!            01/01/70 00:00      
   explain            01/01/70 00:00      
      What button?            01/01/70 00:00      
         to late            01/01/70 00:00      
            solutions            01/01/70 00:00      
   sort of            01/01/70 00:00      
      right ok            01/01/70 00:00      
   No, But            01/01/70 00:00      
      ill give the button a go            01/01/70 00:00      
         what is the problem?            01/01/70 00:00      
            Use nonvolatile memory            01/01/70 00:00      
   'Warm reset', 'Early power fail'            01/01/70 00:00      
      interesting            01/01/70 00:00      
         you can't teach old dogs new tricks            01/01/70 00:00      
   Hardware Reset?            01/01/70 00:00      
      bad idea            01/01/70 00:00      
         bad idea.......80% agree            01/01/70 00:00      
   May be is..            01/01/70 00:00      
   hardware reset possible..            01/01/70 00:00      

Back to Subject List