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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/01/02 16:52
Read: times


 
#25100 - RE: Processor hangs.
Regarding the watchdog...
If you want a software watchdog and have a spare Timer, you can configure it to check some bit address at regular intervals. The main loop then must set this bit. If it fails to do so within the stipulated interval, the watchdog will break out of the loop and take steps for a 'graceful recovery'

This has two disadvantages:
1) It requires an extra timer. Still, if you are using any timer to generate regular intervals for some other purpose, you only have to add a little bit of code in the ISR, and you can have your watchdog.
2) This will not help if your IC stops executing altogether. eg if there is some heavy noise, there is a chance the IC goes in to some wierd state where nothing, not instructions, not interrupts, nothing executes. In this case the only solution is an external watchdog IC which resets the microcontroller.

But it has one advantage: being an internal timer, it can achieve "graceful recovery" by trying to revert to the last stable state. One example where this can be a pretty big advantage when the uC needs to accept some settings from the user before beginning operation. In that case, you cant directly jump into the main control loop after a reset.

External chips (as far as I know) directly reset the uC, which will then start executing from scratch, and the state at which the processor hung will be lost. I know of no method using an external watchdog, where the machine state can be retrieved.

But if your uC is getting hung due to external reasons such as noise on the Vcc...an external watchdog IC should be the best solution. Of course, sticking to EMI/EMC guidelines is necessary too. Erik and Peter have given a pretty comprehensive list.

Kundi

List of 12 messages in thread
TopicAuthorDate
Processor hangs.            01/01/70 00:00      
RE: Processor hangs.            01/01/70 00:00      
RE: Processor hangs.            01/01/70 00:00      
RE: Processor hangs.            01/01/70 00:00      
RE: Processor hangs.            01/01/70 00:00      
RE: Processor hangs.            01/01/70 00:00      
RE: Processor hangs.            01/01/70 00:00      
RE: Processor hangs.            01/01/70 00:00      
RE: Processor hangs.            01/01/70 00:00      
RE: Processor hangs.            01/01/70 00:00      
RE: Processor hangs.            01/01/70 00:00      
RE: Processor hangs.            01/01/70 00:00      

Back to Subject List