[Top][All Lists]

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

[avr-gcc-list] Preemptable Interrupts

From: Steve Joiner
Subject: [avr-gcc-list] Preemptable Interrupts
Date: 19 Feb 2003 16:23:03 -0500

Hi folks,

I'm hoping someone can help me with a little problem that's got me

I'm trying to figure out how to make the SIG_UART_DATA and SIG_UART_RECV
signals preemptable.  I've got another interrupt that I want interrupt
the UART interrupts if it comes along.  I've also got other lower
priority interrupts that I don't want interrupting the UART interrupts.

I was originally trying to do something like this:

    cbi(TIMSK, TOIE2); /* disable lower priority interrupt */
    cbi(UCSRB, RXCIE); /* disable UART transmit interrupt */
    /* don't disable higher priority interrupt */
    sei(); /* turn interrupts back on */

    /* do stuff here, (minimal amount of code, of course) */

    sbi(UCSRB, RXCIE); 
    sbi(TIMSK, TOIE2);

The problem is that if a byte is received during the ISR, but RXCIE is
cleared, the interrupt is lost.  Does anyone know of a way to accomplish
what I'm trying to do here?

Steve Joiner

reply via email to

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