[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: |
Tue, 18 Dec 2007 16:19:21 +0100 |
User-agent: |
Mutt/1.5.11 |
As Weddington, Eric wrote:
> Regarding the discussion: First, is it an error to not have a
> handler for an enabled interrupt? I would think yes.
I agree.
> If the default is just to return, then I would agree that that does
> not really let the user know of the error. It can get too easily
> lost. The symptoms would just be reduced performance.
In other situations (missing USART interrupt handler), it would enter
an infinite loop only anyway.
There's once been a suggestion from Peter Dannegger in the
German-language www.mikrocontroller.net forum... Ah, yes, his
suggestion was to *call* (rather than jump) to the default handler,
and then
POP r31
POP r30
there so the return address can be monitored by a debugger. One of
the biggest questions with the current implementation is that you're
suddenly faced with: ``Hmm, my program seems to reset the controller,
probably a stray interrupt, but heck, *what* interrupt is it?''
> Would it be better to have the default call exit(1)? Does the default
> implementation of exit go into an infinite loop?
It does, but I'd prefer calling (or jumping to) abort() instead. It's
also an infinite loop by default but it's the intended fault exit
point.
I think both, exit() and abort() should disable interrupts before
running into the loop. Opinions on that? If we agree, it would be a
feature that either has to go into 1.6.0 still, or it will be delayed
until 1.8.x because it's a non backwards-compatible change.
--
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] What about to make 'reti' as a default behaviour?, Dmitry K., 2007/12/16
- RE: [avr-libc-dev] What about to make 'reti' as a default behaviour?, Weddington, Eric, 2007/12/16
- Re: [avr-libc-dev] What about to make 'reti' as a default behaviour?, Marek Michalkiewicz, 2007/12/16
- RE: [avr-libc-dev] What about to make 'reti' as a default behaviour?, Weddington, Eric, 2007/12/16
- Re: [avr-libc-dev] What about to make 'reti' as a default behaviour?, Dmitry K., 2007/12/17
- RE: [avr-libc-dev] What about to make 'reti' as a default behaviour?, Weddington, Eric, 2007/12/18
- Re: [avr-libc-dev] What about to make 'reti' as a default behaviour?,
Joerg Wunsch <=
- RE: [avr-libc-dev] What about to make 'reti' as a default behaviour?, Weddington, Eric, 2007/12/18
- Re: [avr-libc-dev] What about to make 'reti' as a default behaviour?, Joerg Wunsch, 2007/12/18
- RE: [avr-libc-dev] What about to make 'reti' as a default behaviour?, Weddington, Eric, 2007/12/18
- Re: [avr-libc-dev] What about to make 'reti' as a default behaviour?, Joerg Wunsch, 2007/12/18
- Re: [avr-libc-dev] What about to make 'reti' as a default behaviour?, Joerg Wunsch, 2007/12/19
- RE: [avr-libc-dev] What about to make 'reti' as a default behaviour?, Weddington, Eric, 2007/12/19
- Re: [avr-libc-dev] What about to make 'reti' as a default behaviour?, Joerg Wunsch, 2007/12/20
Re: [avr-libc-dev] What about to make 'reti' as a default behaviour?, Erik Christiansen, 2007/12/16