Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Missing interupts

2005-03-28 by al boehnlein

I am working on a control application that reads
quadrature readings from an encoder.  I seem to
missing some counts.  I am wondering what happens to
the interrupts when you are in the "SIGNAL(SIG_LCD)"
ISR routine?  I assume  they are turned off, but I am
wondering if an interrupt occurs while in the routine,
is it saved and executed latter, upon exit?

The documentation is not clear to me, as to what
happens if I get an interrupt on my quadrature sensors
while I am in the LCD ISR.  

Also, can I use cli(); and  sei(); instructions
without fear of missing an interrupt?  I need to read
every quadrature interrupt, although I can wait until
another ISR finishes.

My max interrupt rate is probably around 2000/sec or �
millisecond.

I am using the AVR butterfly.

What approach do you recommend?

Thanks

Al
 

Bit 7 � I: Global Interrupt Enable

The Global Interrupt Enable bit must be set for the
interrupts to be enabled. The individual interrupt
enable control is then performed in separate control
registers. If the Global Interrupt Enable Register is
cleared, none of the interrupts are enabled
independent of the individual interrupt enable
settings. The I-bit is cleared by hardware after an
interrupt has occurred, and is set by the RETI
instruction to enable subsequent interrupts. The Ibit
can also be set and cleared by the application with
the SEI and CLI instructions, as described in the
instruction set reference.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.