[Top][All Lists]

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

Re: [avr-gcc-list] Reenabling interrupts in epilogue of interrupt functi

From: Christian Troedhandl
Subject: Re: [avr-gcc-list] Reenabling interrupts in epilogue of interrupt function
Date: Fri, 23 Aug 2002 19:22:01 +0200 (METDST)

On Fri, 23 Aug 2002, Larry Barello wrote:

> Use the "signal" attribute.
This is not what I want.

In my application I have a timer match signal handler which requires
minimal latency jitter and several other interrupt handlers which should
not block global interrupts for a long time (because if a timer match
occures during the time in which the interrupts are disabled, the timer
match handler will be delayed - in this case by max. 41 clock cycles).

BTW. I have already solved the problem by myself by patching the avr-gcc
sources (patch attached).

With this patch, the stack pointer handling in the epilogue of an
interrupt or signal handler is the same as in normal functions (if
interrupts are enabled, they stay enabled, if they are disabled, they stay

/* epilogue: frame size=2 */
        adiw r28,2
        in __tmp_reg__,__SREG__
        out __SP_H__,r29
        out __SREG__,__tmp_reg__
        out __SP_L__,r28


Christian Troedhandl                   mailto:address@hidden
Real-Time Systems Group                     voice:+43 (1) 58801-18224
Vienna University of Technology
A-1040 Wien, Treitlstr. 3/182-1        http://www.vmars.tuwien.ac.at/

Attachment: irq_stack_ptr.patch
Description: Text document

reply via email to

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