As Weddington, Eric wrote:

> > . Peter Danneggers suggestion to call (rather than jump to) the
> >   default handler, and then pop the topmost two (or three for
> >   avr6) bytes off the stack has some merit.

> I'm sorry, I must have missed this. Why does this have merit?

The default handler can then

pop r25
pop r24

before entering the infinite loop (or calling abort()), so by
examining r24:25 (e.g. in the debugger), you know *which* unexpected
interrupt triggered.  The address in r24:25 will point to one of the
interrupt vector slots.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to