RT,在程序中使用了CLA的__interrupt void Cla1Task2 ( void )进行相关数据的处理,但是发现CPU不能正常响应主程序中的中断了,请大家帮忙分析一下,谢谢~
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.
RT,在程序中使用了CLA的__interrupt void Cla1Task2 ( void )进行相关数据的处理,但是发现CPU不能正常响应主程序中的中断了,请大家帮忙分析一下,谢谢~
Eric Ma,
我用的C语言对CLA编程,调试中可以确定进入了CLA任务中,因为我在CLA任务中读取了ADC的结果赋值给了变量1,并且在主程序中定义了变量2并赋值为a,在CLA任务中对变量2重新赋值为b,调试时确实可以看到变量1跟随ADC的结果寄存器变化,并且变量2的值也变为了b。现在的问题是CLA中的任务都正常执行了,但是主程序中的其他中断函数不能响应了。
在主程序中的CLA返回中断函数如下:
__interrupt void cla1_isr2()
{
AdcRegs.ADCINTFLGCLR.bit.ADCINT2 = 1; // Clear ADCINT2 flag reinitialize for next SOC
PieCtrlRegs.PIEACK.all = 0xFFFF;
}
还请帮忙分析一下,谢谢~
查看一下初始化函数中有没有下面的代码:
EALLOW;
//--- Enable CLA task interruts
Cla1Regs.MIER.all = 0x0001; // Enable CLA interrupt 1
EDIS; // Disable EALLOW protected register access
//--- Enable the CLA interrupt
PieCtrlRegs.PIEIER11.bit.INTx1 = 1; // Enable CLA Task1 in PIE group #11
IER |= 0x0400; // Enable INT11 in IER to enable PIE group 11