??? 03/16/07 07:59 Read: times |
#135079 - watchdog IS expensive... Responding to: ???'s previous message |
... because you have to THINK carefully, where and when to kick or not kick it. Not too often, but on the other hand often enough not to be bitten.
The two-level (on and off on different places). There should be a checkpoint in each part of the program which is expected to be passed within a time slot. No universal prescription though, again, as this all is too application dependent. You have to think on hardware issues, too, e.g. a WD clocked from the mcu's oscillator is worthless for oscillator/crystal failures (which are not uncommon in harsh environment (vibrations, temperature shocks), as the crystal is an electromechanical device). There are also many breeds of dogs, there is no one size fits all. You need to think also what action to take if it bites. In Kai's case, it should've lit the red light. It is not uncommon to keep a counter and/or a log inside the device to be inspected by the serviceman. It's even not necessary that the dog bites on the reset line, you might want to have an interrupt on it. You might also need to act upon the peripherals or the whole system if the dog bites, e.g. emergency stop. At the end of the day, you might find out that there are more issues WITH the watchdog than WITHOUT one... This again is application dependent - in my prevalent application, I prefer the device to hang and get reported, rather than reset quietly, so I simply don't have the dog (and I don't have one in real life, for keeping me busy and the house messy, I've got my kids... :-) ). Nothing is free. JW |