This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Nested Interrupts



I have been following the following wiki that shows how to nest interrupts on C28x.

http://processors.wiki.ti.com/index.php/Interrupt_Nesting_on_C28x

In this article, they talk about only nesting interrupts within the same group.  However, I have a specific application where I want to allow interrupts of a lower group to interrupt.

Say I have ADCINT1_ISR (group 1, highest priority), but I want to allow a trip zone interrupt (group 2), to interrupt the CPU if I am currently executing ADCINT1_ISR.  The code below shows how I am trying to do this.  It seems to be working, but the wiki article warns of unwanted behavior if you do this.  I just want to make sure that doing this will be ok.  Right now, these are the only 2 interrupts in my code.

Also, what happens if the trip zone interrupt occurs at some point in time before EINT is executed?  Will it get missed?  Or, will it still interrupt ADCINT1_ISR and get serviced after EINT?

interrupt void ADCINT1_ISR(void)                /* PIE1.1 @ 0x000D40  ADCINT1                                         */
{
Uint16 TempPIEIER;
    /* Allow TZINT2 to interrupt*/
    TempPIEIER = PieCtrlRegs.PIEIER2.all;
    IER |= M_INT2;
    IER &= M_INT2;                         // Set "global" priority
    PieCtrlRegs.PIEIER2.all = 0x0002;      // Set "group" priority
    PieCtrlRegs.PIEACK.all = 0xFFFF;        // Enable PIE interrupts
    asm("       NOP");                      // Wait one cycle
    EINT;                                   // Clear INTM to enable interrupts
    /* Allow TZINT2 to interrupt*/



    //Do ADCINT1_ISR stuff




    AdcRegs.ADCINTFLGCLR.bit.ADCINT1 = 1;       // Clear ADCINT1 flag
    /* Restore */
    DINT;
    PieCtrlRegs.PIEIER2.all = TempPIEIER;
}