[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AW: [avr-gcc-list] reentrant interrupt service routine
From: |
Sven Schlender |
Subject: |
AW: [avr-gcc-list] reentrant interrupt service routine |
Date: |
Tue, 1 Apr 2008 22:14:30 +0200 |
Hi again,
> Interrupts are disabled while they are executed. This way
> interrupt are
> by default executed without nesting. If you like to nest interrupts you
> have to reenable interrupts within your interrupt service handler using
> eg. sei(). I use this schema and it works without complains. You just
> have to be careful with your stack as the interrupt service which
> enables other interrupts an be called again and then lock the mcu.
So far I know.
There is another (or maybe the same) problem I think about. Lets say there
is function which is callable from main() AND from any interrupt routine.
Than you have the possibility while executing this function that due a
rising interrupt, this function is executed again in parallel manor (its
like a hidden recursion).
It is possible that some state (stored in a register or file) of the
function gets corrupted through the second call than? From where knows the
compiler which register are to stored on the stack if a interrupt is rising?
Do the compiler check for such a situation (maybe with a call tree), in case
it can produce potential problems?
Regards, Sven.
- [avr-gcc-list] reentrant interrupt service routine, Sven Schlender, 2008/04/01
- RE: [avr-gcc-list] reentrant interrupt service routine, Weddington, Eric, 2008/04/01
- Re: [avr-gcc-list] reentrant interrupt service routine, Jan Menzel, 2008/04/01
- AW: [avr-gcc-list] reentrant interrupt service routine,
Sven Schlender <=
- Re: AW: [avr-gcc-list] reentrant interrupt service routine, Pink Boy, 2008/04/02
- Re: AW: [avr-gcc-list] reentrant interrupt service routine, Dmitry K., 2008/04/02
- Re: AW: [avr-gcc-list] reentrant interrupt service routine, Mark Litwack, 2008/04/02
- Re: AW: [avr-gcc-list] reentrant interrupt service routine, Mark Litwack, 2008/04/07
- RE: AW: [avr-gcc-list] reentrant interrupt service routine, Weddington, Eric, 2008/04/07
- Re: [avr-gcc-list] reentrant interrupt service routine, hutchinsonandy, 2008/04/07
- Re: [avr-gcc-list] reentrant interrupt service routine, Bernard Fouché, 2008/04/07
- RE: [avr-gcc-list] reentrant interrupt service routine, Weddington, Eric, 2008/04/07
- Re: AW: [avr-gcc-list] reentrant interrupt service routine, Mark Litwack, 2008/04/07
- RE: AW: [avr-gcc-list] reentrant interrupt service routine, Weddington, Eric, 2008/04/07