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.

TMS320F280048C-Q1: Interrupt: Entering an interrupt inside another interrupt ISR

Part Number: TMS320F280048C-Q1
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Hi Experts,

In my code, I am enabling XINT1 inside XINT5 ISR and I want to enter the XINT1 ISR before exiting XINT5 ISR, which has a higher priority and should not be a problem! but when I run my code it does not enter XINT1 ISR. Am I doing something wrong? Should I use nesting? and if yes, is it the only way?

  • Hi,

    Can you provide the code snippet used for enabling XINT1 inside XINT5 ISR. Are the interrupts enabled globally also inside the ISR?

    Thanks
    Vasudha

  • Hi Vasudha,

    Here is part of my XINT5 ISR:

        GPIO_setInterruptType(GPIO_INT_XINT1, GPIO_INT_TYPE_RISING_EDGE);
        Interrupt_register(INT_XINT1, &ISR_xint1);
        GPIO_setInterruptPin(GPIO_PIN_1, GPIO_INT_XINT1);

    Are the interrupts enabled globally also inside the ISR?

    No, all the interrupts are enabled globally in the initiation phase. Another GPIO is being used with XINT1, and another ISR is being called. But when the XINT5 flag is set, I want to change the GPIO and ISR.

    P.S. I did another test. even when I don't change the interrupt pin and the ISR, I can not enter any ISR as long as I am inside another ISR. Am I missing something? 

    (I am enabling interrupts using SYSCONFIG)

    Thanks,

    Mina

  • Hi,

    BY default the nesting is not enabled in c28x. All the interrupts are disabled while entering the ISR. To enable nesting, interrupts needs to be enabled explicitly. Refer to interrupt_ex3_sw_prioritization example available in C2000Ware to enable interrupt nesting and configurable software priorities for interrupts. Let me know if this resolves your query.

    Thanks
    Vasudha 

  • Hi,

    Thank you Vasudha. That's all I needed to know... I wanted to be sure that nesting is the only option