"Steve Franks" <[EMAIL PROTECTED]> wrote: > Ah, that's it. wdt_disable() at the top of main() on the old > architecture is sufficient. I guess *reading* wdt.h instead of > *skimming* wdt.h would be advised.
Or read the documentation produced by it: http://www.nongnu.org/avr-libc/user-manual/group__avr__watchdog.html I recommend placing the respective function in section .init3 there. In many cases, it will probably be sufficient to put it at the beginning of main(), but I've just been curious, and made a short estimation. Say, in an ATmega1281, you might be tempted to put a number of string literals in RAM as you've got 8 KB of RAM which is sufficient for a while (i. e. you don't move them explicitly to progmem). The loop to initialize the RAM takes 9 clocks per byte, so with the default 1 MHz CPU clock, that will be 9 µs per byte. With the watchdog triggering after 15 ms, you could have up to 1660 bytes of initialized data (20 % of the RAM) until the watchdog fires if the wdt_disable() is only placed at the beginning of main(). -- J"org Wunsch Unix support engineer [EMAIL PROTECTED] http://www.interface-systems.de/~j/ _______________________________________________ AVR-chat mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-chat
