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/TMS320F28035: Interrupt Nesting Problem

Part Number: TMS320F28035
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi,

• I am trying to implement interrupt nesting between CPU TIMER 0 and ADCINT.

• ADCINT is triggered via ePWM4 and operating at 15KHz. CPU0 operating at 5Khz.

• I want ADCINT to be executed , while CPU0 is already executing.

• Following is the code snippet I used :

__interrupt void cpu_timer0_isr(void)

{

    PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;

     uint16_t TempPIEIER;

       TempPIEIER = PieCtrlRegs.PIEIER1.all; // Save PIEIER register for later

       IER |= 0x001;                         // Set global priority by adjusting IER

       IER &= 0x001;

       PieCtrlRegs.PIEIER1.all &= 0x0001;    // Set group priority by adjusting PIEIER2 to allow INT2.2 to interrupt current ISR

       PieCtrlRegs.PIEACK.all = 0xFFFF;      // Enable PIE interrupts

       asm(" NOP");                    // Wait one cycle

       EINT;                                 // Clear INTM to enable interrupts

       //

       // Insert ISR Code here.......

       // for now just insert a delay

       //

       DELAY_US(100);

       //

       // Restore registers saved:

       //

       DINT;

       PieCtrlRegs.PIEIER1.all = TempPIEIER;

    return;

}

 

__interrupt void

adc_isr(void)

{

BATT_CURRENT= AdcResult.ADCRESULT3;

BATT_VOLTAGE = AdcResult.ADCRESULT4;

//

// Clear ADCINT1 flag reinitialize for next SOC

//

AdcRegs.ADCINTFLGCLR.bit.ADCINT1 = 1;

PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;   // Acknowledge interrupt to PIE

return;

}

• However, ADCINT freezes when I execute the code - ADC values don't update in watch window. 

• Ideally whatever the delay is there in CPU0 , ADCINT execution should not be affected if nesting is working correctly.

 

Kindly help !!!!