Hello,
I have some problems with the ADCDRV_1ch funtion. I'm using the DPLIB v3.1 on a piccolo controlSTICK with the blank-template file.
The PWM works fine so far.
I've added the following lines to set up the ePWM trigger:
EALLOW;
EPwm2Regs.ETSEL.bit.SOCAEN = 1;
EPwm2Regs.ETSEL.bit.SOCASEL = 1;
EPwm2Regs.ETPS.bit.SOCAPRD = 1;
EDIS;
and initialize the ADC with:
ChSel[0] = 0; // ADC A0
TrigSel[0] = 7; // EPM2 SOCA
ACQPS[0] = 6;
ADC_SOC_CNF(ChSel,TrigSel,ACQPS,1,0); // Mode 0
The problem is that it only converts for one time from the ADC kickstart. Changing to mode 2 (CLA) makes no diffenrence.
Any solution to this?