I need a WDT to work. A simple one. It need to reset the uP if the software get stuck somewhere. I have Googled for examples but it is rather hard to se what I need. Many examples uses Irq. I think I don't need that.
I think I need:
1) wdt_disable block (before main)
2) Init-block. Time-out?
3) Wdt_start or enable...
4) wdt_reset() Should it be more code before?
I need to stop wdt before the sleep(Power_down) I suppose. What about restart wdt after wakeup?
I don't need to set FUSE WDTON? I only need a reset.
It seems simple but...Before I went home today my application went crazy restarting in high speed. Now, I read that I need to reset and disable the WD before main(). So. That is a block to...
Can anyone give me some hints? There lots of macros. Should I use them or should I go direct to bit-manipulate the registers? macros are nice but using setbit/clearbit are more easy to understand I must say.
(regarding my last thread; The UART:s working very well now. Thanks)