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.

CCS/TMS320F28069: interrupt nesting with the same group (INT3.6 and INT3.7)

Part Number: TMS320F28069

Tool/software: Code Composer Studio

I have a interrupt nesting problem with the INT3.6 and INT3.7, the INT3.6 is 500kHz  interrupt  and INT3.7 is 50kHz interrupt. they both trigger when count == zero and the count is sync.

when these two interrupt overlaping INT3.6 will miss the interrupt. my ISR code are as follow:

__interrupt void epwm6_timer_isr(void)
{

......

EPWM6Regs.ETCLR.bit.INT = EPWM_INT_FLAG_CLEAR;

PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;

#if DEBUG_PWM ==1
SCPwmRegs.AQSFRC.bit.OTSFA = 1;
SCPwmRegs.AQSFRC.bit.ACTSFA = 1;
#endif
}

__interrupt void epwm7_timer_isr(void)
{
EINT;
IER&=M_INT3;

........

EPWM7Regs.ETCLR.bit.INT = EPWM_INT_FLAG_CLEAR;
PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;

#if DEBUG_PWM ==1
SLPwmRegs.AQSFRC.bit.OTSFA = 1;
SLPwmRegs.AQSFRC.bit.ACTSFA = 1;
#endif
}

the test picture is follow:

Look forward to your reply.

Thank you.

  • You need to move the writes to PIEACK to the start of each ISR. Further interrupts on that line will not happen until the PIE group is acknowledged.

    Also, if you are enabling core interrupts inside an ISR using EINT, you need to disable them again before it ends to protect the context restore. Finally I think the instruction to re-enable INT3 within IER was wrong.

    Your 3.7 ISR would look something like this:

    __interrupt void epwm7_timer_isr(void)
    {
    PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;
    IER |= M_INT3;
    EINT;

    ........

    EPWM7Regs.ETCLR.bit.INT = EPWM_INT_FLAG_CLEAR;

    #if DEBUG_PWM ==1
    SLPwmRegs.AQSFRC.bit.OTSFA = 1;
    SLPwmRegs.AQSFRC.bit.ACTSFA = 1;
    #endif

    DINT;
    }

    Please try this and see if it works.

    Regards,

    Richard
  • It works . Thank you.