[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] assembly-c mix and interrupts
From: |
Weddington, Eric |
Subject: |
RE: [avr-gcc-list] assembly-c mix and interrupts |
Date: |
Thu, 19 Nov 2009 06:40:43 -0700 |
> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> org] On Behalf Of darkschine
> Sent: Thursday, November 19, 2009 6:09 AM
> To: address@hidden
> Subject: [avr-gcc-list] assembly-c mix and interrupts
>
>
> Before I continue, I would like to suggest a resolution to my
> problem. I am
> using the ATmega328P
> My assembly code follows a standard that ALL registers used
> are pushed and
> popped from the stack. However, my assembly code does NOT
> store the SREG.
> Could this be causing my problems?
Yes.
If your interrupt routine starts, performs some code which changes the value of
SREG, and then returns back to mainline code which has some branch instruction
that depends on the Status Register to determine which branch to take, then you
will get unexpected results as the Status Register now reflects what happened
in your interrupt code and not what happened in the mainline code before the
interrupt occurred.
- Re: [avr-gcc-list] assembly-c mix and interrupts, (continued)
- Re: [avr-gcc-list] assembly-c mix and interrupts, Julius Luukko, 2009/11/19
- Message not available
- Re: [avr-gcc-list] assembly-c mix and interrupts, Julius Luukko, 2009/11/20
- [avr-gcc-list] Re: assembly-c mix and interrupts, David Brown, 2009/11/20
- Re: [avr-gcc-list] assembly-c mix and interrupts, darkschine, 2009/11/29
- Re: [avr-gcc-list] assembly-c mix and interrupts, Joerg Wunsch, 2009/11/30
- Re: [avr-gcc-list] assembly-c mix and interrupts, darkschine, 2009/11/30
- RE: [avr-gcc-list] assembly-c mix and interrupts, Weddington, Eric, 2009/11/30
- RE: [avr-gcc-list] assembly-c mix and interrupts, darkschine, 2009/11/30
- Re: [avr-gcc-list] assembly-c mix and interrupts, Paul Stoffregen, 2009/11/30
- RE: [avr-gcc-list] assembly-c mix and interrupts, darkschine, 2009/11/30
RE: [avr-gcc-list] assembly-c mix and interrupts,
Weddington, Eric <=
Re: [avr-gcc-list] assembly-c mix and interrupts, Ruud Vlaming, 2009/11/19
[avr-gcc-list] Re: assembly-c mix and interrupts, David Brown, 2009/11/19
Re: [avr-gcc-list] assembly-c mix and interrupts, Erik Christiansen, 2009/11/20