[En-Nut-Discussion] Watchdog Debugging

Timothy M. De Baillie debaillie at ciholas.com
Wed Sep 24 20:28:03 CEST 2008


Bernard Fouche' wrote:
> Timothy M. De Baillie wrote:
>   
>> Any thoughts or improvements out there in the ether?
>>   
>>     
> What about:
>
> - with a configuration option, remove usage of the hardware watchdog and 
> provide a software one, based on a available timer/counter. When the 
> counter reaches its max value, an interrupt is fired. One must choose a 
> max value that makes the timer/counter with a timing equals to the real 
> watchdog (or the closest possible).
>
> - the function to reset the hardware watchdog then just reset the 
> timer/counter.
>
> - the interrupt fired when the counter reaches its max value can write 
> information to EEPROMs, banked RAM, on the serial port, etc.
>
> I use a similar scheme on targets without any OS (for debugging), or if 
> I the maximum allowed time by the hardware watchdog is too short for 
> some processing: in that case I have to reset the hardware watchdog at 
> different points in the code but I keep the software watchdog running 
> with a longer period and reset it only in the main application cycle 
> (again on targets without OS and in that case this system is kept even 
> when debugging is not needed but only to ensure to have some kind of 
> watchdog).
>
> Regards,
>
>  Bernard
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
>   
This isn't a BAD solution. I think it is worth considering.

Tim



More information about the En-Nut-Discussion mailing list