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

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

Re: [avr-gcc-list] Inserting code before context save in an ISR (for nes


From: Paulo Marques
Subject: Re: [avr-gcc-list] Inserting code before context save in an ISR (for nested interrupts)
Date: Mon, 06 Aug 2007 12:56:21 +0100
User-agent: Thunderbird 1.5.0.12 (X11/20070509)

David Carr wrote:
Hi all,

Hi, David

[...]
Is there a way to inject a simple sei() into the start of an ISR before
the automatic context save?

This used to be the difference between the "INTERRUPT" and the "SIGNAL" macros.

With a recent gcc / libc, you should declare your interrupt handler as:

ISR(<handler_name>, ISR_NOBLOCK)
{
        ...
}

to have the whole handler run with interrupts enabled.

I hope this helps,

--
Paulo Marques
Software Development Department - Grupo PIE, S.A.
Phone: +351 252 290600, Fax: +351 252 290601
Web: www.grupopie.com

"Prediction is hard. Especially of the future."
Niels Bohr




reply via email to

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