From d1cd3f213cdb82f73f2f7e1a292fb1b5effbb87d Mon Sep 17 00:00:00 2001 From: David Kopf Date: Mon, 14 Nov 2011 11:36:18 -0500 Subject: [PATCH] Add general unsupported interrupt vector suggested by Daniel Willmann --- cpu/avr/dev/clock.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cpu/avr/dev/clock.c b/cpu/avr/dev/clock.c index 94fbc1863..dce8e500d 100644 --- a/cpu/avr/dev/clock.c +++ b/cpu/avr/dev/clock.c @@ -192,8 +192,14 @@ clock_seconds(void) } while(tmp != seconds); return tmp; } - +#ifdef HANDLE_UNSUPPORTED_INTERRUPTS +/* Ignore unsupported interrupts, optionally hang for debugging */ +ISR(BADISR_vect) { +//static volatile uint8_t x;while (1) x++; +} +#endif #ifdef HANG_ON_UNKNOWN_INTERRUPT +/* Hang on any unsupported interrupt */ /* Useful for diagnosing unknown interrupts that reset the mcu. * Currently set up for 12mega128rfa1. * For other mcus, enable all and then disable the conflicts.