Part Number: TMS320F28377S I find that ADC interrupt routine function can't be executed sometime when interrupt overflow happens frequently. the test fuction is as below. (1)、 __interrupt void Adca1_isr ( void ) { uitest[0] = AdcaRegs.ADCINTFLG.bit.ADCINT1; AdcaRegs.ADCINTFLGCLR.bit.ADCINT1=1; uitest[1] = AdcaRegs.ADCINTFLG.bit.ADCINT1; uitest[2] = PieCtrlRegs.PIEIFR1.bit.INTx1; PieCtrlRegs.PIEACK.all = PIEACK_GROUP1; if( AdcaRegs.ADCINTFLG.bit.ADCINT1 == 1 &&PieCtrlRegs.PIEIFR1.bit.INTx1 == 0) { uitest[3] = EPwm1Regs.TBCTR; } Task_RealTime(); } (2)、 __interrupt void Adca1_isr ( void ) { Task_RealTime(); uitest[0] = AdcaRegs.ADCINTFLG.bit.ADCINT1; AdcaRegs.ADCINTFLGCLR.bit.ADCINT1=1; uitest[1] = AdcaRegs.ADCINTFLG.bit.ADCINT1; uitest[2] = PieCtrlRegs.PIEIFR1.bit.INTx1; PieCtrlRegs.PIEACK.all = PIEACK_GROUP1; if( AdcaRegs.ADCINTFLG.bit.ADCINT1 == 1 &&PieCtrlRegs.PIEIFR1.bit.INTx1 == 0) { uitest[3] = EPwm1Regs.TBCTR; } } the test result of the two interrrupt routine functions is the same, when interrupt routine function can't be executed, we can always see uitest[0]=1、uitest[1]=1、uitest[2]=0. it should be that new ADC interrupt flag is set during clearing this interrupt flag,then some thing happening leads to corresponding interrupt flag bit not set in PIEIFR register. then the ADC interrupt routine can't be executed. i want to know what is the root cause for this issue, and how to avoid this issue happen. Thanks.
↧