我在ePWM1的INT中断里面利用软件强制触发16路AD转换,ADC转换完成后后触发CLA进行滤波计算,之后CLA触发中断通知主程序进行控制输出
现在的问题是:
(1)如果使能adc1_isr中断,则epwm1_timer_isr无法运行
(2)后来参照D:\ti\controlSUITE\device_support\f2806x\v151\F2806x_examples_ccsv5\cla_adc_fir_flash例程序修改成不允许adc1_isr中断,则epwm1_timer_isr运行一段时间后又就无法中断了;复位i在运行,也中断同样的次数后epwm1_timer_isr又无法中断了
PieVectTable.TINT0 = &cpu_timer0_isr; PieVectTable.ADCINT1 = &adc1_isr; PieVectTable.EPWM1_INT = &epwm1_timer_isr; EDIS;
PieCtrlRegs.PIECTRL.bit.ENPIE = 1; // Enable the PIE block
PieCtrlRegs.PIEIER1.bit.INTx7 = 1; // tint0_isr;
PieCtrlRegs.PIEIER1.bit.INTx1 = 1; // adc1_isr; PieCtrlRegs.PIEIER3.bit.INTx1 = 1; // epwm1_timer_isr;
PieCtrlRegs.PIEIER11.bit.INTx1 = 1; // cla1_task1_isr;
PieCtrlRegs.PIEACK.all = (M_INT1 | M_INT3 | M_INT11) ;
IER |= M_INT1;
IER |= M_INT3;
IER |= M_INT11;
Seven Han:
您好,
检查下是否清标志位。
AdcRegs.ADCINTFLGCLR.bit.ADCINT7 = 1; PieCtrlRegs.PIEACK.all = 0xFFFF;
robert liu:
回复 Seven Han:
__interrupt void cla1_task1_isr( void){ //PieCtrlRegs.PIEACK.bit.ACK11 = 1; AdcRegs.ADCINTFLGCLR.bit.ADCINT1 = 1; PieCtrlRegs.PIEACK.all = PIEACK_GROUP1; }
我用的是CLA_TASK1,有清ADC标志