[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] SIGNAL and INTERRUPT overhead
From: |
Nigel Winterbottom |
Subject: |
RE: [avr-gcc-list] SIGNAL and INTERRUPT overhead |
Date: |
Sat, 20 Aug 2005 22:34:02 +0100 |
-----Original Message-----
From:James A.R. Koehler
If the consensus is that we need to be protected against ourselves by
having all the existing prolog in the two existing interrupt service
methods, perhaps the solution is to have a third category of interrupt
service routine in which nothing is pushed onto the stack and the
programmer takes full responsibility for making sure the machine is
returned to the same state it was before the interrupt.
Jim
----------------------
Well Jim,
Actually this already exists in the form of applying an attribute to the
SIGNAL or INTERRUPT name. I use it in my code as the example below shows.
e.g.
__attribute__ ((naked)) SIGNAL(SIG_ADC)
{
//The way bAdcTime is defined causes a SBI instruction to be generated which
does not affect SREG
bAdcTime = true;
__asm__ __volatile__ (" reti \n" : : );
}
Regards
Nigel
- [avr-gcc-list] SIGNAL and INTERRUPT overhead, James A.R. Koehler, 2005/08/20
- RE: [avr-gcc-list] SIGNAL and INTERRUPT overhead,
Nigel Winterbottom <=
- RE: [avr-gcc-list] SIGNAL and INTERRUPT overhead, James A.R. Koehler, 2005/08/20
- Re: [avr-gcc-list] SIGNAL and INTERRUPT overhead, Royce Pereira, 2005/08/21
- Re: [avr-gcc-list] SIGNAL and INTERRUPT overhead, Benjamin Titzer, 2005/08/22
- Re: [avr-gcc-list] SIGNAL and INTERRUPT overhead, Royce Pereira, 2005/08/23
- Re: [avr-gcc-list] SIGNAL and INTERRUPT overhead, Bernard Fouché, 2005/08/23
- Re: [avr-gcc-list] SIGNAL and INTERRUPT overhead, Royce Pereira, 2005/08/23
- Re: [avr-gcc-list] SIGNAL and INTERRUPT overhead, Bernard Fouché, 2005/08/23