Resolved, sort of.. It's a bug in the sim. Lucky me. If I turn off the WDT, then I never get reset. If I have the main loop doing nothing but WDR instructions, and the WDT is enabled, then I get reset. But on reset, the appropriate flag bit is NOT set, which would have indicated a WDT reset. AVR Studio 4.13.528 GUI Version 4, 13, 0, 528 AVR Simulator 1, 0, 2, 0 ATmega128 249 Operating System Major 5 Minor 1 PlatformID 2 Build 2600 Service Pack 2 Plugins: AvrPluginAvrAsmObject 1, 0, 0, 45 AvrPluginavrgccplugin 1, 0, 0, 7 Stk500Dll 1, 0, 1, 0
Message
Studio 4.13 WDT bug
2007-06-19 by Dave VanHorn