Tool/software:
Hi Team,
Using TMS320F28034,
Sample one analog signal multiple times, trigger SOC0 with software, and after EOC0 is completed, there is an ADCINT1 interrupt flag. The total interrupt has been masked and will not enter the ADC to complete the interrupt. The time for testing 5 consecutive samples is inconsistent, sometimes 3us and sometimes 6us, the difference is too large.
What is the reason for this problem? The code is as follows.
AdcRegs.INTSEL1N2.all = 0x0020; //S0C0转换完成产生中断ADCINT1
AdcRegs.ADCSOC0CTL.all = 0x0248; //采样
IER = M_INT2 ; // Disable interrupts:
while(gShortGnd.ShortCnt1 <=4)
{
// Force start of conversion on SOC0
AdcRegs.ADCSOCFRC1.all = 0x01;
// Wait for end of conversion.
while(AdcRegs.ADCINTFLG.bit.ADCINT1 == 0)
{
// add code
// KickDog();
}
AdcRegs.ADCINTFLGCLR.bit.ADCINT1 = 1; // Clear ADCINT1
temp = AdcResult.ADCRESULT0 -2047 ;//IU
gShortGnd.ShortCurU = Filter8(temp, gShortGnd.ShortCurU);
gShortGnd.ShortCnt1++;
};
IER |= (M_INT1 | M_INT2 | M_INT3 | M_INT5 | M_INT9); // Enable interrupts: