[Top][All Lists]

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

RE: [avr-gcc-list] INTERRUPT v. SIGNAL problem

From: Borchardt, John Joseph (UMC-Student)
Subject: RE: [avr-gcc-list] INTERRUPT v. SIGNAL problem
Date: Tue, 23 Apr 2002 16:03:45 -0500

Thanks, Dean.  I had already implemented the manual sei()
using SIGNAL, and it worked fine.  It just makes me nervous
when I don't understand exactly what's goin on.  What is
the "preamble" you refer to?  Is this gcc-generated code
that makes the isr possible, like pushing the SREG and PC
onto the stack?

...Seems to me that avr-gcc could use some detailed documentation
on pitfalls like this.  Perhaps we could start a tips and tricks
section here at avr1.org?  

Thanks, I really appreciate it.

-----Original Message-----
From: Dean Ferreyra
To: Borchardt, John Joseph (UMC-Student); address@hidden
Sent: 4/23/02 3:32 PM
Subject: RE: [avr-gcc-list] INTERRUPT v. SIGNAL problem


I believe your problem is that INTERRUPT re-enables interrupts in the
preamble, before your code reaches your read of UDR, causing the
to interrupt again and again.  If you want to re-enable interrupts in
ISR, you can use SIGNAL, read from the UDR, and only then re-enable
interrupts yourself.


-----Original Message-----
From: address@hidden [mailto:address@hidden
Behalf Of Borchardt, John Joseph (UMC-Student)
Sent: Tuesday, April 23, 2002 12:23 PM
To: address@hidden
Subject: [avr-gcc-list] INTERRUPT v. SIGNAL problem


I'm developing a data transmission protocol using the
2313 UART interrupts, and I'm experiencing a strange
problem.  When I change SIGNAL(SIG_UART_RECV){ ... } to
INTERRUPT(SIG_UART_RECV){ ... }, the isr will not be
called.  Timer and external interrupts are disabled,
and only the UART transmit complete and receive complete
are enabled.  The first thing the SIG_UART_RECV isr does
is to read the UDR, clearing the RXC flag.  The second
thing the isr does is to put a pin high for debugging
purposes.  Everything seems to work fine with SIGNAL,
but not INTERRUPT.  Does anyone know why I'm experiencing
this problem?

Thanks in advance for your help.

-John Borchardt
avr-gcc-list at http://avr1.org

avr-gcc-list at http://avr1.org

reply via email to

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