avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] What about to make 'reti' as a default behaviour?


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] What about to make 'reti' as a default behaviour?
Date: Thu, 20 Dec 2007 22:20:35 +0100
User-agent: Mutt/1.5.11

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. ;-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]