avr-gcc-list
[Top][All Lists]
Advanced

[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





reply via email to

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