Message: 1 Date: Wed, 21 Feb 2007 22:38:35 -0600 (CST) From: "Kevin Neff" <[EMAIL PROTECTED]> Subject: [avr-gcc-list] Reset on TIMER1 Overflow To: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain;charset=iso-8859-1I have an ATMega128 that is resetting unexpectantly after about 10 seconds. This is a surprise because 1. The WDT is off--fuses are correct & wdt_disable() is called early in the program. 2. The interrupt handler (TIMER1_OVF_vect) gets a value from flash and places it in TCNT1H and TCNT1L (in the correct order), 3. A debugging signal (a 0.5-second buzz, LED flash) in the interrupt handler does not get executed. 4. Disabling the overflow interrupt for TIMER1 (TIMSK, bit 2) fixes the problem. 5. My default interrupt handler overrides resets but also does not seem to be called (buzzer doesn't sound, LED doesn't turn on). Maybe I'm missing something obvious. Anyone have an idea where I could start looking for clues? --Kevin
Kevin, The first thing I would do is look at your .lst file (if you aren't getting one the mfile utility in the winavr distribution will create a makefile that generates .lst files, assuming you are on windows, not unix) The interrupt handlers are at/near the start of ram, and the table is reasonably obvious as I recall - see if it looks correct first of all. The iom128.h file should have macros with the integer index of each specific interrupt, so you can know what's what in the table. Oh, and please post further non-compiler specific avr questions to avr-chat instead of avr-gcc. Steve _______________________________________________ AVR-chat mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-chat
