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.

dsp28069使用查询法实现ad采样的问题



我在dsp28069的epwm中断中使用查询法莱实现ad采样的即: while (AdcRegs.ADCINTFLG.bit.ADCINT1 == 0){}     AdcRegs.ADCINTFLGCLR.bit.ADCINT1 = 1;,但当我运行程序的时候,程序只停留在在while (AdcRegs.ADCINTFLG.bit.ADCINT1 == 0){} 这行,说明ad的中断标志位没有置位,这是怎么回事,下面是我的ad模块的相应配置:

EALLOW;    

 AdcRegs.ADCCTL2.bit.ADCNONOVERLAP = 1; 

 AdcRegs.INTSEL1N2.bit.INT1E     = 1; //Enabled ADCINT1

 AdcRegs.INTSEL1N2.bit.INT1CONT  = 0; //Disable ADCINT1 Continuous mode   

 AdcRegs.INTSEL1N2.bit.INT1SEL  = 0x06;  

AdcRegs.ADCSOC0CTL.all = 0x2806; 

AdcRegs.ADCSOC1CTL.all = 0x2806;        // (Sample window = ACQPS + 1)ACQPS_Value = 6   

  AdcRegs.ADCSOC2CTL.all = 0x2806;    

AdcRegs.ADCSOC3CTL.all = 0x2806;           

AdcRegs.ADCSOC4CTL.all = 0x2846;        // set SOC4,5,6,7 channel select to ADCINA1,start trigger on EPWM1A    

 AdcRegs.ADCSOC5CTL.all = 0x2846;        // (Sample window = ACQPS + 1)ACQPS_Value = 6   

  AdcRegs.ADCSOC6CTL.all = 0x2846;          

  AdcRegs.ADCSOC7CTL.all = 0x2846;

 EDIS;

 

 EPwm1Regs.ETSEL.bit.SOCAEN = 1;           // Enable SOC on A group   

 EPwm1Regs.ETSEL.bit.SOCASEL = 1;                 //计数器等于0触发一次AD转换   

EPwm1Regs.ETPS.bit.SOCAPRD  = 1;                 // Generate pulse on 1st event   

 EPwm1Regs.ETCLR.bit.SOCA = 1;