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.

ADC Interrupt issue when CLA task is not empty



Hi Lori,

I am using two identical filtering procedures in CLA tasks

__interrupt void Cla1Task1 ( void )
{
__mdebugstop();
int i;
float fTemp = 0;
fTemp = 0;
#pragma UNROLL(49)
for(i=FILTER_LEN-1;i>0;i--)
{
fDelayLine1[i] = fDelayLine1[i-1];
fTemp += W1[i]*fDelayLine1[i];
}
fDelayLine1[0] = (float)xn1; //convert to single precision float
fTemp += W1[0]*fDelayLine1[0];
yn1 = (int)fTemp;
__mdebugstop();
}
__interrupt void Cla1Task2 ( void )
{
__mdebugstop();
/* int i;
float fTemp = 0;
fTemp = 0;
#pragma UNROLL(49)
for(i=FILTER_LEN-1;1>0;i--)
{
fDelayLine2[i] = fDelayLine2[i-1];
fTemp += W2[i]*fDelayLine2[i];
}
fDelayLine2[0] = (float)xn2; //convert to single precision float
fTemp += W2[0]*fDelayLine2[0];
yn2 = (int)fTemp;*/
yn2 = xn2; // just to bypass filtering
__mdebugstop();

}

I am calling  those tasks from adc_int

interrupt void adca_isr(void)
{
xn1 = AdcaResultRegs.ADCRESULT0;
Cla1ForceTask1andWait();
DacbRegs.DACVALS.all = yn1;//left
}

interrupt void adcb_isr(void)
{
xn2 = AdcbResultRegs.ADCRESULT0;
Cla1ForceTask2andWait();
DaccRegs.DACVALS.all = yn2;//right
}

And clear interrupt here

__interrupt void cla1Isr1 ()
{
AdcaRegs.ADCINTFLGCLR.bit.ADCINT1 = 1;
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
PieCtrlRegs.PIEACK.all = M_INT11;
// asm(" ESTOP0");
}

//
// cla1Isr1 - CLA1 ISR 2
//
__interrupt void cla1Isr2 ()
{
AdcbRegs.ADCINTFLGCLR.bit.ADCINT1 = 1;
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
PieCtrlRegs.PIEACK.all = M_INT11;
// asm(" ESTOP0");
}

The problem is if I uncomment the second CLA task filter it stops issuing both adca and adcb interrupt

thanks vadim