InitAdc();
EALLOW;
AdcRegs.ADCCTL1.bit.INTPULSEPOS = 1;
AdcRegs.INTSEL1N2.bit.INT1E = 1;
AdcRegs.INTSEL1N2.bit.INT1CONT = 0;
AdcRegs.INTSEL1N2.bit.INT1SEL = 1;
AdcRegs.ADCSOC0CTL.bit.CHSEL = 0;
AdcRegs.ADCSOC1CTL.bit.CHSEL = 1;
AdcRegs.ADCSOC0CTL.bit.TRIGSEL = 5;
AdcRegs.ADCSOC1CTL.bit.TRIGSEL = 5;
AdcRegs.ADCSOC0CTL.bit.ACQPS = 6;
AdcRegs.ADCSOC1CTL.bit.ACQPS = 6;
EDIS;
EPwm1Regs.ETSEL.bit.SOCAEN = 1; // Enable SOC on A group
EPwm1Regs.ETSEL.bit.SOCASEL = 4; // Select SOC from from CPMA on upcount
EPwm1Regs.ETPS.bit.SOCAPRD = 1; // Generate pulse on 1st event
EPwm1Regs.CMPA.half.CMPA = 0x0080; // Set compare A value
EPwm1Regs.TBPRD = 0xFFFF; // Set period for ePWM1
EPwm1Regs.TBCTL.bit.CTRMODE = 0; // count up and start
以上是ADC_SOC的例程,想请教,
1.为什么只用了一个ADC_INT1中断来读取两个AD信号,这个中断只对应了SOC1,为什么还能读取SOC0通道的模拟量?
2.可不可以不用中断的方式读取AD?直接在主循环里不停的读取?
3.为什么28035的ADC与28335的ADC结构完全不一样?
4.28035的AD是不是有SOC中断和EOC中断,SOC中断可以映射到(
tiMER、XINT、ePWM中断),EOC中断映射到ADCINT1~9,不知道我这样理解对不对?
0