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

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

[avr-gcc-list] More interrupt oddity


From: Chris Baugher
Subject: [avr-gcc-list] More interrupt oddity
Date: Fri, 19 Oct 2001 21:11:40 -0500 (CDT)

Hello again,

I've stumbled into another interrupt problem. The code looks like this:


volatile char displacement;

SIGNAL(SIG_INTERRUPT0)
{
        --displacement;
}

SIGNAL(SIG_INTERRUPT1)
{
        ++displacement;
}


INTERRUPT(SIG_OVERFLOW0)
{
        ...

        read value of displacement and do some stuff

        ...

}


What's happening is that the increment and decrement are being eliminated
somehow during linking. I know this because the list file shows the
correct code but the object module only has one instruction (reti) for
each ISR. How can I keep this from happening?

Thanks again.

Chris|





reply via email to

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